Back to home page

EIC code displayed by LXR

 
 

    


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

0001 configure_file(
0002     ActsVersion.hpp.in
0003     ${CMAKE_CURRENT_BINARY_DIR}/include/Acts/ActsVersion.hpp
0004 )
0005 
0006 # source files will be added later
0007 acts_add_library(Core "")
0008 
0009 target_sources(ActsCore PRIVATE src/ActsVersion.cpp)
0010 
0011 target_compile_features(ActsCore PUBLIC ${ACTS_CXX_STANDARD_FEATURE})
0012 
0013 set(ACTS_GEOMETRY_MODULE_CAPI 1)
0014 set(_acts_geometry_module_abi_tag
0015     "acts-${Acts_VERSION}|sys-${CMAKE_SYSTEM_NAME}|arch-${CMAKE_SYSTEM_PROCESSOR}|cxx-${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}|capi-${ACTS_GEOMETRY_MODULE_CAPI}"
0016 )
0017 set(ACTS_GEOMETRY_MODULE_ABI_TAG
0018     "${_acts_geometry_module_abi_tag}"
0019     CACHE INTERNAL
0020     "ACTS geometry module ABI tag"
0021 )
0022 
0023 target_include_directories(
0024     ActsCore
0025     PUBLIC
0026         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0027         # for the generated version header
0028         $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
0029         $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
0030 )
0031 target_link_libraries(ActsCore PUBLIC Boost::boost Eigen3::Eigen)
0032 if(CMAKE_DL_LIBS)
0033     target_link_libraries(ActsCore PRIVATE ${CMAKE_DL_LIBS})
0034 endif()
0035 
0036 target_compile_definitions(
0037     ActsCore
0038     PRIVATE ACTS_GEOMETRY_MODULE_ABI_TAG="${_acts_geometry_module_abi_tag}"
0039 )
0040 
0041 if(ACTS_PARAMETER_DEFINITIONS_HEADER)
0042     target_compile_definitions(
0043         ActsCore
0044         PUBLIC
0045             -DACTS_PARAMETER_DEFINITIONS_HEADER="${ACTS_PARAMETER_DEFINITIONS_HEADER}"
0046     )
0047 endif()
0048 
0049 if(ACTS_SOURCELINK_SBO_SIZE)
0050     target_compile_definitions(
0051         ActsCore
0052         PUBLIC -DACTS_SOURCELINK_SBO_SIZE=${ACTS_SOURCELINK_SBO_SIZE}
0053     )
0054 endif()
0055 
0056 if(ACTS_LOG_FAILURE_THRESHOLD)
0057     message(
0058         STATUS
0059         "Enable log failure threshold, set to ${ACTS_LOG_FAILURE_THRESHOLD}"
0060     )
0061     target_compile_definitions(
0062         ActsCore
0063         PUBLIC
0064             -DACTS_LOG_FAILURE_THRESHOLD=${ACTS_LOG_FAILURE_THRESHOLD}
0065             -DACTS_ENABLE_LOG_FAILURE_THRESHOLD
0066     )
0067 else()
0068     if(ACTS_ENABLE_LOG_FAILURE_THRESHOLD)
0069         message(STATUS "Enable log failure threshold")
0070         target_compile_definitions(
0071             ActsCore
0072             PUBLIC -DACTS_ENABLE_LOG_FAILURE_THRESHOLD
0073         )
0074     endif()
0075 endif()
0076 
0077 if(ACTS_ENABLE_CPU_PROFILING)
0078     message(STATUS "added lprofiler")
0079 
0080     if(NOT ACTS_GPERF_INSTALL_DIR STREQUAL "")
0081         find_library(PROFILER_LIBRARY profiler HINTS ${ACTS_GPERF_INSTALL_DIR})
0082 
0083         target_link_libraries(ActsCore PUBLIC ${PROFILER_LIBRARY})
0084     else()
0085         target_link_libraries(ActsCore PUBLIC -lprofiler)
0086     endif()
0087 
0088     target_link_options(ActsCore PUBLIC "LINKER:-no-as-needed")
0089 endif()
0090 
0091 if(ACTS_ENABLE_MEMORY_PROFILING)
0092     message(STATUS "added ltcmalloc")
0093 
0094     if(NOT ACTS_GPERF_INSTALL_DIR STREQUAL "")
0095         find_library(TCMALLOC_LIBRARY tcmalloc HINTS ${ACTS_GPERF_INSTALL_DIR})
0096 
0097         target_link_libraries(ActsCore PUBLIC ${TCMALLOC_LIBRARY})
0098     else()
0099         target_link_libraries(ActsCore PUBLIC -ltcmalloc)
0100     endif()
0101 endif()
0102 
0103 install(DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
0104 
0105 # Install version header based on git repository status
0106 if(_acts_is_git_repo)
0107     # For git repositories, generate header with hash at install time
0108     install(
0109         CODE
0110             "
0111         # Get git hash at install time
0112         execute_process(
0113             COMMAND git rev-parse HEAD
0114             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
0115             OUTPUT_VARIABLE _install_git_hash
0116             OUTPUT_STRIP_TRAILING_WHITESPACE
0117             ERROR_QUIET
0118         )
0119         execute_process(
0120             COMMAND git rev-parse --short HEAD
0121             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
0122             OUTPUT_VARIABLE _install_git_hash_short
0123             OUTPUT_STRIP_TRAILING_WHITESPACE
0124             ERROR_QUIET
0125         )
0126         execute_process(
0127             COMMAND git diff-index --quiet HEAD --
0128             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
0129             RESULT_VARIABLE _git_is_dirty
0130             ERROR_QUIET
0131         )
0132 
0133         if(NOT _git_is_dirty EQUAL 0)
0134             set(_install_git_hash \"\${_install_git_hash}-dirty\")
0135             set(_install_git_hash_short \"\${_install_git_hash_short}-dirty\")
0136         endif()
0137 
0138         # Configure the version file with hash and version numbers
0139         set(_acts_commit_hash \"\\\"\${_install_git_hash}\\\"\")
0140         set(_acts_commit_hash_short \"\\\"\${_install_git_hash_short}\\\"\")
0141         set(PROJECT_VERSION_MAJOR \"${PROJECT_VERSION_MAJOR}\")
0142         set(PROJECT_VERSION_MINOR \"${PROJECT_VERSION_MINOR}\")
0143         set(PROJECT_VERSION_PATCH \"${PROJECT_VERSION_PATCH}\")
0144     configure_file(
0145         ${CMAKE_CURRENT_SOURCE_DIR}/ActsVersion.hpp.in
0146         ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/Acts/ActsVersion.hpp
0147         @ONLY
0148     )
0149 "
0150     )
0151 else()
0152     # For non-git sources (e.g., tarball), just copy the build-time header
0153     install(
0154         FILES ${CMAKE_CURRENT_BINARY_DIR}/include/Acts/ActsVersion.hpp
0155         DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Acts
0156     )
0157 endif()
0158 
0159 # target source files are added separately
0160 add_subdirectory(src/EventData)
0161 add_subdirectory(src/Definitions)
0162 add_subdirectory(src/Geometry)
0163 add_subdirectory(src/MagneticField)
0164 add_subdirectory(src/Material)
0165 add_subdirectory(src/Navigation)
0166 add_subdirectory(src/Propagator)
0167 add_subdirectory(src/Seeding)
0168 add_subdirectory(src/Seeding2)
0169 add_subdirectory(src/SpacePointFormation2)
0170 add_subdirectory(src/Surfaces)
0171 add_subdirectory(src/TrackFinding)
0172 add_subdirectory(src/TrackFitting)
0173 add_subdirectory(src/Utilities)
0174 add_subdirectory(src/Vertexing)
0175 add_subdirectory(src/Visualization)
0176 add_subdirectory(src/AmbiguityResolution)
0177 
0178 acts_compile_headers(Core GLOB include/Acts/**/*.hpp)