Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/Tests/DownstreamProject/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.11)
0002 
0003 project(ActsDownstreamProject)
0004 enable_testing()
0005 
0006 # find all optional components that are build
0007 find_package(
0008     Acts
0009     CONFIG
0010     REQUIRED
0011     COMPONENTS Core Fatras PluginJson PluginRoot PluginCovfie
0012 )
0013 
0014 # place artifacts in GNU-like paths, e.g. binaries in `<build>/bin`
0015 include(GNUInstallDirs)
0016 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
0017     "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}"
0018 )
0019 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
0020     "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}"
0021 )
0022 
0023 # link with all optional components even when they are not really used
0024 # to check e.g. for possible linker issues
0025 add_executable(ShowActsVersion ShowActsVersion.cpp)
0026 target_link_libraries(
0027     ShowActsVersion
0028     PRIVATE
0029         Acts::Core
0030         Acts::Fatras
0031         Acts::PluginJson
0032         Acts::PluginRoot
0033         Acts::PluginCovfie
0034 )
0035 
0036 option(DD4HEP "Build with DD4hep" ON)
0037 if(DD4HEP)
0038     message(STATUS "Adding DD4hep plugin")
0039     find_package(Acts CONFIG REQUIRED COMPONENTS PluginDD4hep)
0040     target_link_libraries(ShowActsVersion PRIVATE Acts::PluginDD4hep)
0041 endif()
0042 
0043 option(EDM4HEP "Build with EDM4hep" ON)
0044 if(EDM4HEP)
0045     message(STATUS "Adding EDM4hep plugin")
0046     find_package(Acts CONFIG REQUIRED COMPONENTS PluginEDM4hep)
0047     target_link_libraries(ShowActsVersion PRIVATE Acts::PluginEDM4hep)
0048 endif()
0049 
0050 option(GEOMODEL "Build with GeoModel" ON)
0051 if(GEOMODEL)
0052     message(STATUS "Adding GeoModel plugin")
0053     find_package(Acts CONFIG REQUIRED COMPONENTS PluginGeoModel)
0054     target_link_libraries(ShowActsVersion PRIVATE Acts::PluginGeoModel)
0055 endif()
0056 
0057 find_package(Boost REQUIRED COMPONENTS program_options)
0058 
0059 include(ActsGeometryModuleHelpers)
0060 
0061 acts_add_geometry_module(SimpleGeometryModule GeometryModule.cpp)
0062 
0063 add_executable(LoadGeometryModule LoadGeometryModule.cpp)
0064 target_link_libraries(
0065     LoadGeometryModule
0066     PRIVATE Acts::Core Boost::program_options
0067 )
0068 
0069 add_test(NAME DownstreamShowActsVersion COMMAND ShowActsVersion)
0070 add_test(
0071     NAME DownstreamLoadGeometryModule
0072     COMMAND LoadGeometryModule $<TARGET_FILE:SimpleGeometryModule>
0073 )
0074 
0075 if(DD4HEP)
0076     include(ActsDD4hepGeometryModuleHelpers)
0077 
0078     acts_add_dd4hep_geometry_module(
0079         DD4hepGeometryModule
0080         DD4hepGeometryModule.cpp
0081     )
0082 
0083     target_link_libraries(LoadGeometryModule PRIVATE Acts::PluginDD4hep)
0084     target_compile_definitions(LoadGeometryModule PRIVATE ACTS_HAVE_DD4HEP)
0085 endif()