Back to home page

EIC code displayed by LXR

 
 

    


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

0001 # This file is part of the ACTS project.
0002 #
0003 # Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 #
0005 # This Source Code Form is subject to the terms of the Mozilla Public
0006 # License, v. 2.0. If a copy of the MPL was not distributed with this
0007 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 # Let the user know what's happening.
0010 message(STATUS "Building 'detray::core' component")
0011 
0012 # Set up the "core library".
0013 file(
0014     GLOB _detray_core_public_headers
0015     RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
0016     "include/detray/algebra/common/*.hpp"
0017     "include/detray/algebra/generic/*.hpp"
0018     "include/detray/algebra/utils/*.hpp"
0019     "include/detray/builders/*.hpp"
0020     "include/detray/core/*.hpp"
0021     "include/detray/definitions/*.hpp"
0022     "include/detray/geometry/coordinates/*.hpp"
0023     "include/detray/geometry/shapes/*.hpp"
0024     "include/detray/geometry/*.hpp"
0025     "include/detray/material/*.hpp"
0026     "include/detray/navigation/accelerators/*.hpp"
0027     "include/detray/navigation/intersection/bounding_box/*.hpp"
0028     "include/detray/navigation/intersection/soa/*.hpp"
0029     "include/detray/navigation/intersection/*.hpp"
0030     "include/detray/navigation/*.hpp"
0031     "include/detray/propagator/actors/*.hpp"
0032     "include/detray/propagator/*.hpp"
0033     "include/detray/tracks/*.hpp"
0034     "include/detray/utils/grid/*.hpp"
0035     "include/detray/utils/ranges/*.hpp"
0036     "include/detray/utils/*.hpp"
0037 )
0038 file(
0039     GLOB _detray_core_private_headers
0040     "include/detray/*/detail/*.hpp"
0041     "include/detray/*/*/detail/*.hpp"
0042 )
0043 detray_add_library( detray_core core
0044    ${_detray_core_public_headers} ${_detray_core_private_headers}
0045 )
0046 target_link_libraries(detray_core INTERFACE vecmem::core)
0047 
0048 message(STATUS "Setting detray log level: ${DETRAY_SET_LOGGING}")
0049 target_compile_definitions(
0050     detray_core
0051     INTERFACE DETRAY_LOG_LVL=${DETRAY_LOG_LVL}
0052 )
0053 
0054 # Propagate some compiler definitions
0055 if(DETRAY_INTERNAL_USE_NO_UNIQUE_ADDRESS_ANNOTATION)
0056     target_compile_definitions(
0057         detray_core
0058         INTERFACE DETRAY_INTERNAL_USE_NO_UNIQUE_ADDRESS_ANNOTATION
0059     )
0060 endif()
0061 
0062 # Generate a version header for the project.
0063 configure_file(
0064     "cmake/version.hpp.in"
0065     "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/detray/version.hpp"
0066     @ONLY
0067 )
0068 install(
0069     FILES
0070         "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/detray/version.hpp"
0071     DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/detray"
0072 )
0073 list(APPEND detray_core_public_headers "detray/version.hpp")
0074 target_include_directories(
0075     detray_core
0076     INTERFACE
0077         $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}>
0078 )
0079 
0080 # Set up the libraries that use specific algebra plugins.
0081 detray_add_library( detray_core_array core_array )
0082 target_link_libraries(
0083     detray_core_array
0084     INTERFACE detray::core detray::algebra_array
0085 )
0086 
0087 if(DETRAY_EIGEN_PLUGIN)
0088     detray_add_library( detray_core_eigen core_eigen )
0089     target_link_libraries(
0090         detray_core_eigen
0091         INTERFACE detray::core detray::algebra_eigen
0092     )
0093 endif()
0094 
0095 if(DETRAY_FASTOR_PLUGIN)
0096     detray_add_library( detray_core_fastor core_fastor )
0097     target_link_libraries(
0098         detray_core_fastor
0099         INTERFACE detray::core detray::algebra_fastor
0100     )
0101 endif()
0102 
0103 if(DETRAY_SMATRIX_PLUGIN)
0104     detray_add_library( detray_core_smatrix core_smatrix )
0105     target_link_libraries(
0106         detray_core_smatrix
0107         INTERFACE detray::core detray::algebra_smatrix
0108     )
0109 endif()
0110 
0111 if(DETRAY_VC_AOS_PLUGIN)
0112     detray_add_library( detray_core_vc_aos core_vc_aos )
0113     target_link_libraries(
0114         detray_core_vc_aos
0115         INTERFACE detray::core detray::algebra_vc_aos
0116     )
0117 endif()
0118 
0119 if(DETRAY_VC_SOA_PLUGIN)
0120     detray_add_library( detray_core_vc_soa core_vc_soa )
0121     target_link_libraries(
0122         detray_core_vc_soa
0123         INTERFACE detray::core detray::algebra_vc_soa
0124     )
0125 endif()
0126 
0127 # Test the public headers of the detray core libraries.
0128 if(BUILD_TESTING AND DETRAY_BUILD_TESTING)
0129     string(
0130         REPLACE "include/"
0131         ""
0132         _detray_core_public_headers
0133         "${_detray_core_public_headers}"
0134     )
0135     detray_test_public_headers(detray_core_array
0136       ${_detray_core_public_headers}
0137     )
0138     if(DETRAY_EIGEN_PLUGIN)
0139         detray_test_public_headers(detray_core_eigen
0140          ${_detray_core_public_headers}
0141         )
0142     endif()
0143     if(DETRAY_SMATRIX_PLUGIN)
0144         detray_test_public_headers(detray_core_smatrix
0145          ${_detray_core_public_headers}
0146         )
0147     endif()
0148     if(DETRAY_VC_AOS_PLUGIN)
0149         detray_test_public_headers(detray_core_vc_aos
0150          ${_detray_core_public_headers}
0151         )
0152     endif()
0153 endif()
0154 
0155 # Clean up.
0156 unset(_detray_core_public_headers)
0157 unset(_detray_core_private_headers)