diff --git a/CMakeLists.txt b/CMakeLists.txt index ca12c4aab5e35047c71fd28d28a160ae0b1a302f..6cce4d8078d1af5310c706f4715deb0a1d4abb56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,12 +9,12 @@ unset(ENV{CPATH}) file(READ version_number _acts_version) string(STRIP ${_acts_version} _acts_version) -project (Acts VERSION ${_acts_version} LANGUAGES CXX) +project(Acts VERSION ${_acts_version} LANGUAGES CXX) -list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # get git commit hash -include (GetGitRevisionDescription) +include(GetGitRevisionDescription) get_git_head_revision(_git_refspec _git_hash) git_local_changes(_git_local_changes) string(SUBSTRING "${_git_hash}" 0 8 _git_hash_short) @@ -23,36 +23,36 @@ string(SUBSTRING "${_git_hash}" 0 8 _git_hash_short) # all options must be defined here to keep the list directly visible and # make the option variables available everywhere -option (ACTS_BUILD_LEGACY "Build legacy package" OFF) -option (ACTS_BUILD_DOC "Build documentation" OFF) -option (ACTS_BUILD_EXAMPLES "Build examples" OFF) -option (ACTS_BUILD_TESTS "Build unit tests" OFF) -option (ACTS_BUILD_INTEGRATION_TESTS "Build integration tests" OFF) -option (ACTS_BUILD_DIGITIZATION_PLUGIN "Build Digitization plugin" OFF) -option (ACTS_BUILD_DD4HEP_PLUGIN "Build DD4HEP plugin" OFF) -option (ACTS_BUILD_IDENTIFICATION_PLUGIN "Build Identification plugin" OFF) -option (ACTS_BUILD_JSON_PLUGIN "Build Json plugin" OFF) -option (ACTS_BUILD_TGEO_PLUGIN "Build TGeo plugin" OFF) +option(ACTS_BUILD_LEGACY "Build legacy package" OFF) +option(ACTS_BUILD_DOC "Build documentation" OFF) +option(ACTS_BUILD_EXAMPLES "Build examples" OFF) +option(ACTS_BUILD_TESTS "Build unit tests" OFF) +option(ACTS_BUILD_INTEGRATION_TESTS "Build integration tests" OFF) +option(ACTS_BUILD_DD4HEP_PLUGIN "Build DD4HEP plugin" OFF) +option(ACTS_BUILD_DIGITIZATION_PLUGIN "Build Digitization plugin" OFF) +option(ACTS_BUILD_IDENTIFICATION_PLUGIN "Build Identification plugin" OFF) +option(ACTS_BUILD_JSON_PLUGIN "Build Json plugin" OFF) +option(ACTS_BUILD_TGEO_PLUGIN "Build TGeo plugin" OFF) # all other compile-time parameters must be defined here for clear visibility # and to avoid forgotten options somewhere deep in the hierarchy -set (ACTS_PARAMETER_DEFINITIONS_PLUGIN "Acts/Utilities/detail/DefaultParameterDefinitions.hpp" CACHE FILEPATH "Default track parameter definition") +set(ACTS_PARAMETER_DEFINITIONS_PLUGIN "Acts/Utilities/detail/DefaultParameterDefinitions.hpp" CACHE FILEPATH "Default track parameter definition") # handle inter-plugin dependencies # DD4hepPlugin depends on TGeoPlugin -if (ACTS_BUILD_DD4HEP_PLUGIN) - set (ACTS_BUILD_TGEO_PLUGIN ON) +if(ACTS_BUILD_DD4HEP_PLUGIN) + set(ACTS_BUILD_TGEO_PLUGIN ON) endif() # TGeoPlugin depends on IdentificationPlugin -if (ACTS_BUILD_TGEO_PLUGIN) - set (ACTS_BUILD_IDENTIFICATION_PLUGIN ON) +if(ACTS_BUILD_TGEO_PLUGIN) + set(ACTS_BUILD_IDENTIFICATION_PLUGIN ON) endif() # additional configuration and tools -include (GNUInstallDirs) # GNU-like installation paths, e.g. lib/, include/, ... -include (ActsCompilerOptions) # default compile options -include (ActsFunctions) # Acts-specific helper functions -include (ActsComponentsHelpers) # handle components via add_..._if commands +include(GNUInstallDirs) # GNU-like installation paths, e.g. lib/, include/, ... +include(ActsCompilerOptions) # default compile options +include(ActsFunctions) # Acts-specific helper functions +include(ActsComponentsHelpers) # handle components via add_..._if commands # required packages set(Boost_NO_BOOST_CMAKE ON) # disable new cmake features from Boost 1.70 on @@ -71,20 +71,18 @@ if(ACTS_BUILD_TGEO_PLUGIN) endif() # core library and plugins -add_component (Core Core) -add_component_if (Legacy Legacy ACTS_BUILD_LEGACY) -add_subdirectory (Plugins) - +add_component(Core Core) +add_component_if(Legacy Legacy ACTS_BUILD_LEGACY) +add_subdirectory(Plugins) # examples and tests if(ACTS_BUILD_TESTS OR ACTS_BUILD_INTEGRATION_TESTS) include(CTest) # must be included from the main CMakeLists.txt endif() -add_subdirectory_if (Tests ACTS_BUILD_TESTS OR ACTS_BUILD_INTEGRATION_TESTS OR ACTS_BUILD_EXAMPLES) - +add_subdirectory_if(Tests ACTS_BUILD_TESTS OR ACTS_BUILD_INTEGRATION_TESTS OR ACTS_BUILD_EXAMPLES) # documentation -add_subdirectory_if (doc ACTS_BUILD_DOC) +add_subdirectory_if(doc ACTS_BUILD_DOC) # setup script and cmake configuration files -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/setup.sh.in ${CMAKE_CURRENT_BINARY_DIR}/setup.sh) -install (FILES ${CMAKE_CURRENT_BINARY_DIR}/setup.sh DESTINATION ${CMAKE_INSTALL_BINDIR}) -include (ActsCreateConfig) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.sh.in ${CMAKE_CURRENT_BINARY_DIR}/setup.sh) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/setup.sh DESTINATION ${CMAKE_INSTALL_BINDIR}) +include(ActsCreateConfig) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 548e07d7a0766c2988e2ee0df4b61116c67ff36c..1aa3c2042dba96462ae38fab3a56cef854ac7dbd 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -1,29 +1,31 @@ -file (GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp" "include/*.ipp") +configure_file( + ActsVersion.hpp.in + ${CMAKE_CURRENT_BINARY_DIR}/Acts/ActsVersion.hpp) -add_library(ActsCore SHARED ${src_files}) +file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp" "include/*.ipp") -# set per-target c++17 requirement that will be propagated to linked targets +add_library(ActsCore SHARED ${src_files}) target_compile_features(ActsCore PUBLIC cxx_std_17) -target_compile_definitions(ActsCore PUBLIC -DACTS_PARAMETER_DEFINITIONS_PLUGIN="${ACTS_PARAMETER_DEFINITIONS_PLUGIN}") -target_include_directories(ActsCore SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}) -target_include_directories(ActsCore PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) +target_compile_definitions( + ActsCore + PUBLIC -DACTS_PARAMETER_DEFINITIONS_PLUGIN="${ACTS_PARAMETER_DEFINITIONS_PLUGIN}") +target_include_directories( + ActsCore + SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} + PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + # for the generated version header + $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) +target_link_libraries(ActsCore PUBLIC Boost::boost) install( TARGETS ActsCore EXPORT ActsCoreTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT ActsCore) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install( DIRECTORY include/Acts - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT Core) - -# generate version header and make it available to the build -configure_file( - ActsVersion.hpp.in - ${CMAKE_CURRENT_BINARY_DIR}/Acts/ActsVersion.hpp) -target_include_directories(ActsCore PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/Acts/ActsVersion.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Acts) diff --git a/Legacy/CMakeLists.txt b/Legacy/CMakeLists.txt index a43d0e98abe880e4a88195ed024955b52f029bba..c43f909a978d2d7ad1f13aab60f2a7d8488bfd05 100644 --- a/Legacy/CMakeLists.txt +++ b/Legacy/CMakeLists.txt @@ -1,8 +1,17 @@ -add_library(ActsLegacy INTERFACE) - -target_compile_features(ActsCore PUBLIC cxx_std_17) -target_include_directories(ActsLegacy SYSTEM INTERFACE ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}) -target_include_directories(ActsLegacy INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) +add_library( + ActsLegacy INTERFACE) +target_compile_features( + ActsLegacy + INTERFACE cxx_std_17) +target_include_directories( + ActsLegacy + SYSTEM INTERFACE ${EIGEN_INCLUDE_DIRS} + INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) +target_link_libraries( + ActsLegacy + INTERFACE Boost::boost) install( TARGETS ActsLegacy diff --git a/Plugins/CMakeLists.txt b/Plugins/CMakeLists.txt index 26a2ed30233bd2ab1a57f9b5bb706ff31d028bdd..2247c03fd4fc8d902525219c1c546d66b281ba66 100644 --- a/Plugins/CMakeLists.txt +++ b/Plugins/CMakeLists.txt @@ -1,6 +1,6 @@ -add_component_if (DD4hep DD4hepPlugin ACTS_BUILD_DD4HEP_PLUGIN) -add_component_if (Digitization DigitizationPlugin ACTS_BUILD_DIGITIZATION_PLUGIN) -add_component_if (Identification IdentificationPlugin ACTS_BUILD_IDENTIFICATION_PLUGIN) -add_component_if (Json JsonPlugin ACTS_BUILD_JSON_PLUGIN) -add_component_if (TGeo TGeoPlugin ACTS_BUILD_TGEO_PLUGIN) +add_component_if(DD4hep DD4hepPlugin ACTS_BUILD_DD4HEP_PLUGIN) +add_component_if(Digitization DigitizationPlugin ACTS_BUILD_DIGITIZATION_PLUGIN) +add_component_if(Identification IdentificationPlugin ACTS_BUILD_IDENTIFICATION_PLUGIN) +add_component_if(Json JsonPlugin ACTS_BUILD_JSON_PLUGIN) +add_component_if(TGeo TGeoPlugin ACTS_BUILD_TGEO_PLUGIN) propagate_components_to_parent() diff --git a/Plugins/DD4hep/CMakeLists.txt b/Plugins/DD4hep/CMakeLists.txt index 723dc12fca01ff9f03552cdac1c121bfa5f9739a..fbfb53745973170088fa599cf3c1d7827c3d45ec 100644 --- a/Plugins/DD4hep/CMakeLists.txt +++ b/Plugins/DD4hep/CMakeLists.txt @@ -1,12 +1,14 @@ file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") add_library(ActsDD4hepPlugin SHARED ${src_files}) - -target_include_directories(ActsDD4hepPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) -target_include_directories(ActsDD4hepPlugin PUBLIC ${DD4hep_INCLUDE_DIRS}) -target_link_libraries(ActsDD4hepPlugin PUBLIC ActsCore) -target_link_libraries(ActsDD4hepPlugin PUBLIC ActsTGeoPlugin) -target_link_libraries(ActsDD4hepPlugin PUBLIC ${DD4hep_DDCORE_LIBRARY}) +target_include_directories( + ActsDD4hepPlugin + PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> + ${DD4hep_INCLUDE_DIRS}) +target_link_libraries( + ActsDD4hepPlugin + PUBLIC ActsCore ActsTGeoPlugin ${DD4hep_DDCORE_LIBRARY}) install( TARGETS ActsDD4hepPlugin diff --git a/Plugins/Digitization/CMakeLists.txt b/Plugins/Digitization/CMakeLists.txt index 6ff33a7ce277cbdd287055be23d2d39667ee4286..2e25a0c668229de339e6e85f31cafb3f36860865 100644 --- a/Plugins/Digitization/CMakeLists.txt +++ b/Plugins/Digitization/CMakeLists.txt @@ -1,9 +1,10 @@ file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") add_library(ActsDigitizationPlugin SHARED ${src_files}) - -target_include_directories(ActsDigitizationPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) -target_include_directories(ActsDigitizationPlugin PUBLIC ${ROOT_INCLUDE_DIRS}) +target_include_directories( + ActsDigitizationPlugin + PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) target_link_libraries(ActsDigitizationPlugin PUBLIC ActsCore) install( diff --git a/Plugins/Identification/CMakeLists.txt b/Plugins/Identification/CMakeLists.txt index e3a7571fb19ba982a53cb913e04541e9361832f4..e41671baf45b60afe52fdf2ed6f32089a60aef47 100644 --- a/Plugins/Identification/CMakeLists.txt +++ b/Plugins/Identification/CMakeLists.txt @@ -1,6 +1,8 @@ add_library(IdentificationPlugin INTERFACE) - -target_include_directories(IdentificationPlugin INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) +target_include_directories( + IdentificationPlugin + INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) target_link_libraries(IdentificationPlugin INTERFACE ActsCore) install( diff --git a/Plugins/Json/CMakeLists.txt b/Plugins/Json/CMakeLists.txt index e3a7b8c11d02c44318cdece8f9066ce2d0c51358..c2494e9d6d2efd373cf70d841eaaf37f0c60803c 100644 --- a/Plugins/Json/CMakeLists.txt +++ b/Plugins/Json/CMakeLists.txt @@ -1,5 +1,3 @@ -add_library(ActsJsonPlugin INTERFACE) - # Reference for the json header file, obtained from # https://github.com/nlohmann/json/releases set(_json_dep_header_sha256_ref d2eeb25d2e95bffeb08ebb7704cdffd2e8fca7113eba9a0b38d60a5c391ea09a) @@ -7,13 +5,15 @@ set(_json_dep_header_sha256_ref d2eeb25d2e95bffeb08ebb7704cdffd2e8fca7113eba9a0b # Check if hash of file on disk matches the stated hash of the release file(READ "include/Acts/Plugins/Json/lib/json.hpp" _json_dep_header) string(SHA256 _json_dep_header_sha256 "${_json_dep_header}") - -if (NOT ${_json_dep_header_sha256} STREQUAL ${_json_dep_header_sha256_ref}) +if(NOT ${_json_dep_header_sha256} STREQUAL ${_json_dep_header_sha256_ref}) message(FATAL_ERROR "json.hpp hash does not match reference!") endif() -target_include_directories(ActsJsonPlugin SYSTEM INTERFACE ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}) -target_include_directories(ActsJsonPlugin INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) +add_library(ActsJsonPlugin INTERFACE) +target_include_directories( + ActsJsonPlugin + INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) install( TARGETS ActsJsonPlugin diff --git a/Plugins/TGeo/CMakeLists.txt b/Plugins/TGeo/CMakeLists.txt index 9fe65ab73349cfcc78f0c23fcc1cc44a85059c9d..a624b230d1068d95380933c7c07254f25f1dba93 100644 --- a/Plugins/TGeo/CMakeLists.txt +++ b/Plugins/TGeo/CMakeLists.txt @@ -1,12 +1,12 @@ file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") add_library(ActsTGeoPlugin SHARED ${src_files}) - -target_include_directories(ActsTGeoPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) -target_include_directories(ActsTGeoPlugin PUBLIC ${ROOT_INCLUDE_DIRS}) -target_link_libraries(ActsTGeoPlugin PUBLIC ActsCore) -target_link_libraries(ActsTGeoPlugin PUBLIC ROOT::Geom) -target_link_libraries(ActsTGeoPlugin PUBLIC IdentificationPlugin) +target_include_directories( + ActsTGeoPlugin + PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) +target_link_libraries( + ActsTGeoPlugin PUBLIC ActsCore IdentificationPlugin ROOT::Geom) install( TARGETS ActsTGeoPlugin diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index efbcc45e71045749a736f160638381d7f1d79832..b2ab37f41e039efc109ff2489e6277a1caf736d3 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory_if (Core ACTS_BUILD_TESTS) -add_subdirectory_if (Examples ACTS_BUILD_EXAMPLES) -add_subdirectory_if (Integration ACTS_BUILD_INTEGRATION_TESTS) -add_subdirectory_if (Plugins ACTS_BUILD_TESTS) +add_subdirectory_if(Core ACTS_BUILD_TESTS) +add_subdirectory_if(Examples ACTS_BUILD_EXAMPLES) +add_subdirectory_if(Integration ACTS_BUILD_INTEGRATION_TESTS) +add_subdirectory_if(Plugins ACTS_BUILD_TESTS) diff --git a/Tests/Core/CMakeLists.txt b/Tests/Core/CMakeLists.txt index 6c6fd1c85f302e9e6a11b0884c05e498e9c5f8d2..77c1275ccf1d8ef0e8458d4d34c81b48e62d1233 100644 --- a/Tests/Core/CMakeLists.txt +++ b/Tests/Core/CMakeLists.txt @@ -1,11 +1,11 @@ -add_subdirectory (CommonHelpers) -add_subdirectory (EventData) -add_subdirectory (Fitter) -add_subdirectory (Geometry) -add_subdirectory (MagneticField) -add_subdirectory (Material) -add_subdirectory (Propagator) -add_subdirectory (Seeding) -add_subdirectory (Surfaces) -add_subdirectory (Utilities) -add_subdirectory (Vertexing) +add_subdirectory(CommonHelpers) +add_subdirectory(EventData) +add_subdirectory(Fitter) +add_subdirectory(Geometry) +add_subdirectory(MagneticField) +add_subdirectory(Material) +add_subdirectory(Propagator) +add_subdirectory(Seeding) +add_subdirectory(Surfaces) +add_subdirectory(Utilities) +add_subdirectory(Vertexing) diff --git a/Tests/Examples/CMakeLists.txt b/Tests/Examples/CMakeLists.txt index 02e6630a5d663cd097f60b71c92a12e50b37fdea..b0ea2cde54abb860085e7005beca43e87e2461cd 100644 --- a/Tests/Examples/CMakeLists.txt +++ b/Tests/Examples/CMakeLists.txt @@ -1,11 +1,20 @@ -add_library (ActsCustomLogger SHARED src/CustomDefaultLogger.cpp) -target_include_directories (ActsCustomLogger PRIVATE ${PROJECT_SOURCE_DIR}/Core/include) +add_library( + ActsCustomLogger SHARED + src/CustomDefaultLogger.cpp) +target_include_directories( + ActsCustomLogger + PRIVATE ${PROJECT_SOURCE_DIR}/Core/include) -add_executable(ActsTabulateEnergyLoss src/TabulateEnergyLoss.cpp) -target_link_libraries(ActsTabulateEnergyLoss PRIVATE ActsCore ActsTestsCommonHelpers) +add_executable( + ActsTabulateEnergyLoss + src/TabulateEnergyLoss.cpp) +target_link_libraries( + ActsTabulateEnergyLoss + PRIVATE ActsCore ActsTestsCommonHelpers) -install (TARGETS ActsCustomLogger ActsTabulateEnergyLoss - EXPORT ActsExamplesTargets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT Examples) +install( + TARGETS ActsCustomLogger ActsTabulateEnergyLoss + EXPORT ActsExamplesTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT Examples) diff --git a/Tests/Integration/CMakeLists.txt b/Tests/Integration/CMakeLists.txt index d9adc03722f84394ed9963da64e8d2fb51fa68c2..2341a61b0742cf2cdcb1fb98dc2d50ef321eb24c 100644 --- a/Tests/Integration/CMakeLists.txt +++ b/Tests/Integration/CMakeLists.txt @@ -2,27 +2,28 @@ add_custom_target(integration_tests WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}) # macro to collect integration test binaries from subdirectories macro(add_integration_test) - file (RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") - add_custom_target("Integration${ARGV0}" + file(RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") + add_custom_target( + "Integration${ARGV0}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND "${_relPath}/${ARGV0}") add_dependencies(integration_tests "Integration${ARGV0}") endmacro() -add_executable (PropagationTests PropagationTests.cpp) -target_link_libraries (PropagationTests PRIVATE ActsCore ActsTestsCommonHelpers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +add_executable(PropagationTests PropagationTests.cpp) +target_link_libraries(PropagationTests PRIVATE ActsCore ActsTestsCommonHelpers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_integration_test(PropagationTests) -add_executable (InterpolatedSolenoidBFieldTest InterpolatedSolenoidBFieldTest.cpp) -target_link_libraries (InterpolatedSolenoidBFieldTest PRIVATE ActsCore ActsTestsCommonHelpers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +add_executable(InterpolatedSolenoidBFieldTest InterpolatedSolenoidBFieldTest.cpp) +target_link_libraries(InterpolatedSolenoidBFieldTest PRIVATE ActsCore ActsTestsCommonHelpers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_integration_test(InterpolatedSolenoidBFieldTest) -add_executable (BVHNavigationTest BVHNavigationTest.cpp) -target_link_libraries (BVHNavigationTest PRIVATE ActsCore ActsTestsCommonHelpers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +add_executable(BVHNavigationTest BVHNavigationTest.cpp) +target_link_libraries(BVHNavigationTest PRIVATE ActsCore ActsTestsCommonHelpers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_integration_test(BVHNavigationTest) -if (ACTS_BUILD_LEGACY) - add_executable (SeedingTest ATLSeedingIntegrationTest.cpp) - target_link_libraries (SeedingTest PRIVATE ActsLegacy ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +if(ACTS_BUILD_LEGACY) + add_executable(SeedingTest ATLSeedingIntegrationTest.cpp) + target_link_libraries(SeedingTest PRIVATE ActsLegacy ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_integration_test(SeedingTest) -endif() \ No newline at end of file +endif() diff --git a/Tests/Plugins/CMakeLists.txt b/Tests/Plugins/CMakeLists.txt index f6a48592ad9b8429fae7afd3b45abedb7c39065a..9d66c96008cb4386da7e4edee7e3700dc266bc43 100644 --- a/Tests/Plugins/CMakeLists.txt +++ b/Tests/Plugins/CMakeLists.txt @@ -1,2 +1,2 @@ -add_subdirectory_if (Digitization ACTS_BUILD_DIGITIZATION_PLUGIN) -add_subdirectory_if (Json ACTS_BUILD_JSON_PLUGIN) +add_subdirectory_if(Digitization ACTS_BUILD_DIGITIZATION_PLUGIN) +add_subdirectory_if(Json ACTS_BUILD_JSON_PLUGIN) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 35494bdf789613ca74f5f6ce8620875de21f4495..87cb658c71f4a1710c64eebfc0424c44f5392cb5 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,11 +1,18 @@ -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxygen.config.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.config @ONLY) -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/figures/ActsLogo.gif ${CMAKE_CURRENT_BINARY_DIR}/ActsLogo.gif COPYONLY) -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.config.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.config @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/figures/ActsLogo.gif ${CMAKE_CURRENT_BINARY_DIR}/ActsLogo.gif COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml COPYONLY) -add_custom_target (doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.config - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" VERBATIM) +add_custom_target( + doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.config + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM) -install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/figures DESTINATION ${CMAKE_INSTALL_DOCDIR}/html/doc OPTIONAL) -install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL) -install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Acts.tag DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL) +install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/figures + DESTINATION ${CMAKE_INSTALL_DOCDIR}/html/doc OPTIONAL) +install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/Acts.tag + DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)