Commit 2509a056 authored by Lynn Garren's avatar Lynn Garren

first attempt at a cmake build system

parent 93464052
#------------------------------------------------------------------------------
# Top Level CMakeLists.txt for CLHEP
# cmake [-DCMAKE_INSTALL_PREFIX=/install/path]
# [-DCMAKE_BUILD_TYPE=Debug|Release|RelWithDebInfo|MinSizeRel]
# [-Dbuild_docs]
# /path/to/source
# make
# make test
# make install
#
# The default CLHEP build type is CMAKE_BUILD_TYPE=RelWithDebInfo,
# which matches the default CLHEP autoconf flags
#------------------------------------------------------------------------------
# use cmake 2.6 or later
cmake_minimum_required (VERSION 2.6)
# project name
project(CLHEP)
set( VERSION 2.1.0.1 )
set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules ${CMAKE_MODULE_PATH})
message(STATUS "module path is ${CMAKE_MODULE_PATH}" )
if ( build_docs )
message(STATUS "documents WILL be built and installed" )
else()
message(STATUS "documents WILL NOT be installed" )
endif()
# various handy macros
include(EnsureOutOfSourceBuild)
include(CopyHeaders)
include(BuildTest)
include(BuildLibrary)
include(ClhepVariables)
# make sure we are not building in source
clhep_ensure_out_of_source_build()
# because we want to move these libraries about,
# do not embed full path in shared libraries or executables
set (CMAKE_SKIP_RPATH)
ENABLE_TESTING()
# include search path
include_directories ("${PROJECT_BINARY_DIR}")
#build all libraries in a single directory to facilitate testing
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
# define common flags
set( CMAKE_INCLUDE_PATH ${CLHEP_BINARY_DIR} )
# set our preferred compiler flags
clhep_set_compiler_flags()
# get automake/autoconf variables
clhep_autoconf_variables()
clhep_copy_headers( Units Utility Vector Evaluator GenericFunctions Geometry
Random Matrix RandomObjects Cast RefCount Exceptions )
subdirs(Units)
subdirs(Utility)
subdirs(Vector)
subdirs(Evaluator)
subdirs(GenericFunctions)
subdirs(Geometry)
subdirs(Random)
subdirs(Matrix)
subdirs(RandomObjects)
subdirs(Cast)
subdirs(RefCount)
subdirs(Exceptions)
# main Cast cmake instructions
# automake/autoconf variables
set( PACKAGE Cast )
clhep_package_config()
subdirs(Cast)
subdirs(src)
set( pkginclude_HEADERS itos.h )
# notice that defs.h is not referenced here
INSTALL (FILES ${pkginclude_HEADERS}
DESTINATION include/CLHEP/Cast )
/* @PACKAGE@/defs.h Generated by cmake. */
#ifndef @PACKAGE@_DEFS_H
#define @PACKAGE@_DEFS_H
/* Name of package */
#ifndef PACKAGE
#define PACKAGE "@PACKAGE@"
#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#define PACKAGE_BUGREPORT "http://savannah.cern.ch/projects/clhep/"
#endif
/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "@PROJECT_NAME@ @PACKAGE@"
#endif
/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#define PACKAGE_STRING "@PROJECT_NAME@ @PACKAGE@ @VERSION@"
#endif
/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#define PACKAGE_TARNAME "@PACKAGE@"
#endif
/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "@VERSION@"
#endif
/* building with Visual C++ */
/* #undef USING_VISUAL */
/* Version number of package */
#ifndef VERSION
#define VERSION "@VERSION@"
#endif
#endif // @PACKAGE@_DEFS_H
clhep_build_library( Cast itos.cc )
2011-07-11 Lynn Garren <garren@fnal.gov>
* CMakeLists.txt: adding the ability to build with cmake
* cmake/Modules: utility macros for cmake
2011-06-06 Lynn Garren <garren@fnal.gov>
* clhep-config: Since the clhep installation may have been relocated,
......
# main Evaluator cmake instructions
# automake/autoconf variables
set( PACKAGE Evaluator )
clhep_package_config()
subdirs(Evaluator)
subdirs(src)
subdirs(test)
set( pkginclude_HEADERS Evaluator.h )
# notice that defs.h is not referenced here
INSTALL (FILES ${pkginclude_HEADERS}
DESTINATION include/CLHEP/Evaluator )
/* @PACKAGE@/defs.h Generated by cmake. */
#ifndef @PACKAGE@_DEFS_H
#define @PACKAGE@_DEFS_H
/* Name of package */
#ifndef PACKAGE
#define PACKAGE "@PACKAGE@"
#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#define PACKAGE_BUGREPORT "http://savannah.cern.ch/projects/clhep/"
#endif
/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "@PROJECT_NAME@ @PACKAGE@"
#endif
/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#define PACKAGE_STRING "@PROJECT_NAME@ @PACKAGE@ @VERSION@"
#endif
/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#define PACKAGE_TARNAME "@PACKAGE@"
#endif
/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "@VERSION@"
#endif
/* building with Visual C++ */
/* #undef USING_VISUAL */
/* Version number of package */
#ifndef VERSION
#define VERSION "@VERSION@"
#endif
#endif // @PACKAGE@_DEFS_H
clhep_build_library ( Evaluator Evaluator.cc
setStdMath.cc
setSystemOfUnits.cc )
clhep_test( testEvaluator )
clhep_test( testBug66214 SIMPLE )
# main Exceptions cmake instructions
# automake/autoconf variables
set( PACKAGE Exceptions )
# define dependency list that will be used in several places
list(APPEND ${PACKAGE}_DEPS Cast RefCount )
clhep_package_config()
subdirs(Exceptions)
subdirs(src)
subdirs(test)
if ( build_docs )
message(STATUS "building documents for ${PACKAGE}" )
subdirs(doc)
endif()
set( pkginclude_HEADERS ZMerrno.h
ZMerrno.icc
ZMexAction.h
ZMexClassInfo.h
ZMexClassInfo.icc
ZMexHandler.h
ZMexHandler.icc
ZMexLogResult.h
ZMexLogger.h
ZMexSeverity.h
ZMexception.h
ZMexception.icc
ZMthrow.h
arch_spec_Exceptions.mk
link_Exceptions.mk )
# notice that defs.h is not referenced here
INSTALL (FILES ${pkginclude_HEADERS}
DESTINATION include/CLHEP/Exceptions )
/* @PACKAGE@/defs.h Generated by cmake. */
#ifndef @PACKAGE@_DEFS_H
#define @PACKAGE@_DEFS_H
/* Name of package */
#ifndef PACKAGE
#define PACKAGE "@PACKAGE@"
#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#define PACKAGE_BUGREPORT "http://savannah.cern.ch/projects/clhep/"
#endif
/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "@PROJECT_NAME@ @PACKAGE@"
#endif
/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#define PACKAGE_STRING "@PROJECT_NAME@ @PACKAGE@ @VERSION@"
#endif
/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#define PACKAGE_TARNAME "@PACKAGE@"
#endif
/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "@VERSION@"
#endif
/* building with Visual C++ */
/* #undef USING_VISUAL */
/* Version number of package */
#ifndef VERSION
#define VERSION "@VERSION@"
#endif
#endif // @PACKAGE@_DEFS_H
# install Exceptions documentation
INSTALL (FILES ex-design-1
ex-design-2
ex-design-3
ex-design-5
ex-design-6
HepTuple-exceptions
how-ZMxTop-is-setup
mechanics_ZMx.txt
m-pcanal-1
m-pcanal-2
m-pcanal-3
reply-pcanal-1
reply-pcanal-2
whyZMthrowRethrows.txt
ZMthrow_event_sequence.txt
DESTINATION doc/Exceptions )
clhep_build_library( Exceptions ZMerrno.cc
ZMexClassInfo.cc
ZMexHandler.cc
ZMexLogger.cc
ZMexSeverity.cc
ZMexception.cc
ZMthrow.cc )
set( Exceptions_tests testExceptions
testThrowFrom
exctest1
exctest2
exctest3
exctest4
exctestNothrow )
foreach ( test ${Exceptions_tests} )
clhep_test( ${test} )
endforeach ( test ${Exceptions_tests} )
clhep_test( testzmex FAIL )
# main GenericFunctions cmake instructions
# automake/autoconf variables
set( PACKAGE GenericFunctions )
clhep_package_config()
subdirs(GenericFunctions)
subdirs(src)
subdirs(test)
if ( build_docs )
message(STATUS "building documents for ${PACKAGE}" )
subdirs(doc)
endif()
set( pkginclude_HEADERS AbsFunctional.hh
AbsFunction.hh
Abs.hh
AbsParameter.hh
ACos.hh
Airy.hh
Airy.icc
AnalyticConvolution.hh
Argument.hh
ArgumentList.hh
ArrayFunction.hh
ASin.hh
AssociatedLaguerre.hh
AssociatedLegendre.hh
ATan.hh
Bessel.hh
Bessel.icc
BivariateGaussian.hh
ConstMinusFunction.hh
ConstMinusParameter.hh
ConstOverFunction.hh
ConstOverParameter.hh
ConstPlusFunction.hh
ConstPlusParameter.hh
ConstTimesFunction.hh
ConstTimesParameter.hh
Cos.hh
CumulativeChiSquare.hh
CutBase.hh
CutBase.icc
DefiniteIntegral.hh
DoubleParamToArgAdaptor.hh
DoubleParamToArgAdaptor.icc
EllipticIntegral.hh
EllipticIntegral.icc
Erf.hh
Exp.hh
Exponential.hh
FixedConstant.hh
FloatingConstant.hh
FunctionComposition.hh
FunctionConvolution.hh
FunctionDifference.hh
FunctionDirectProduct.hh
FunctionNegation.hh
FunctionNoop.hh
FunctionNumDeriv.hh
FunctionPlusParameter.hh
FunctionProduct.hh
FunctionQuotient.hh
FunctionSum.hh
FunctionTimesParameter.hh
Gaussian.hh
Gamma.hh
GammaDistribution.hh
GenericFunctions.hh
IncompleteGamma.hh
Landau.hh
KroneckerDelta.hh
Legendre.hh
Legendre.icc
LikelihoodFunctional.hh
Ln.hh
LogGamma.hh
LogisticFunction.hh
Mod.hh
ParameterComposition.hh
ParameterDifference.hh
Parameter.hh
ParameterNegation.hh
ParameterProduct.hh
ParameterQuotient.hh
ParameterSum.hh
ParamToArgAdaptor.hh
ParamToArgAdaptor.icc
PeriodicRectangular.hh
Power.hh
Psi2Hydrogen.hh
PtRelFcn.hh
PuncturedSmearedExp.hh
RCBase.hh
Rectangular.hh
ReverseExponential.hh
RKIntegrator.hh
Sigma.hh
Sin.hh
SphericalBessel.hh
SphericalBessel.icc
SphericalNeumann.hh
SphericalNeumann.icc
Sqrt.hh
Square.hh
SymToArgAdaptor.hh
SymToArgAdaptor.icc
Tan.hh
TrivariateGaussian.hh
Variable.hh
X.hh )
# notice that defs.h is not referenced here
INSTALL (FILES ${pkginclude_HEADERS}
DESTINATION include/CLHEP/GenericFunctions )
/* @PACKAGE@/defs.h Generated by cmake. */
#ifndef @PACKAGE@_DEFS_H
#define @PACKAGE@_DEFS_H
/* Name of package */
#ifndef PACKAGE
#define PACKAGE "@PACKAGE@"
#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#define PACKAGE_BUGREPORT "http://savannah.cern.ch/projects/clhep/"
#endif
/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "@PROJECT_NAME@ @PACKAGE@"
#endif
/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#define PACKAGE_STRING "@PROJECT_NAME@ @PACKAGE@ @VERSION@"
#endif
/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#define PACKAGE_TARNAME "@PACKAGE@"
#endif
/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "@VERSION@"
#endif
/* building with Visual C++ */
/* #undef USING_VISUAL */
/* Version number of package */
#ifndef VERSION
#define VERSION "@VERSION@"
#endif
#endif // @PACKAGE@_DEFS_H
# build GenericFunctions documentation
include(BuildTex)
clhep_latex( GenericFunctions genericFunctions example.ps
hydrogen.ps
PartiallyClosed.ps
TotallyClosed.ps
WideOpen.ps
psfig.sty )
clhep_build_library( GenericFunctions Abs.cc
AbsFunctional.cc
AbsFunction.cc
AbsParameter.cc
ACos.cc
AnalyticConvolution.cc
ArrayFunction.cc
ASin.cc
AssociatedLaguerre.cc
AssociatedLegendre.cc
ATan.cc
BivariateGaussian.cc
ConstMinusFunction.cc
ConstMinusParameter.cc
ConstOverFunction.cc
ConstOverParameter.cc
ConstPlusFunction.cc
ConstPlusParameter.cc
ConstTimesFunction.cc
ConstTimesParameter.cc
Cos.cc
CumulativeChiSquare.cc
DefiniteIntegral.cc
Erf.cc
Exp.cc
Exponential.cc
FixedConstant.cc
FloatingConstant.cc
FunctionComposition.cc
FunctionConvolution.cc
FunctionDifference.cc
FunctionDirectProduct.cc
FunctionNegation.cc
FunctionNoop.cc
FunctionNumDeriv.cc
FunctionPlusParameter.cc
FunctionProduct.cc
FunctionQuotient.cc
FunctionSum.cc
FunctionTimesParameter.cc
Gaussian.cc
GammaDistribution.cc
Gamma.cc
IncompleteGamma.cc
KroneckerDelta.cc
Landau.cc
LikelihoodFunctional.cc
Ln.cc
LogGamma.cc
LogisticFunction.cc
Mod.cc
Parameter.cc
ParameterComposition.cc
ParameterDifference.cc
ParameterNegation.cc
ParameterProduct.cc
ParameterQuotient.cc
ParameterSum.cc
PeriodicRectangular.cc
Power.cc
Psi2Hydrogen.cc
PtRelFcn.cc
PuncturedSmearedExp.cc
RCBase.cc
Rectangular.cc
ReverseExponential.cc
RKIntegrator.cc
Sigma.cc
Sin.cc
Sqrt.cc
Square.cc
Tan.cc
TrivariateGaussian.cc
Variable.cc
X.cc )