Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/Detray/io/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::io' component")
0011 
0012 # Set up the I/O utils library.
0013 file(
0014     GLOB _detray_io_utils_public_headers
0015     RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
0016     "include/detray/io/utils/*.hpp"
0017 )
0018 detray_add_library( detray_io_utils io_utils
0019    ${_detray_io_utils_public_headers}
0020 )
0021 
0022 # Set up the core I/O library.
0023 file(
0024     GLOB _detray_io_public_headers
0025     RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
0026     "include/detray/io/backend/*.hpp"
0027     "include/detray/io/backend/detail/*.hpp"
0028     "include/detray/io/frontend/*.hpp"
0029     "include/detray/io/frontend/detail/*.hpp"
0030     "include/detray/io/frontend/impl/*.hpp"
0031     "include/detray/io/json/*.hpp"
0032     "include/detray/io/json/detail/*.hpp"
0033 )
0034 detray_add_library( detray_io io
0035    ${_detray_io_public_headers}
0036 )
0037 target_link_libraries(
0038     detray_io
0039     INTERFACE
0040         nlohmann_json::nlohmann_json
0041         vecmem::core
0042         detray::core
0043         detray::io_utils
0044 )
0045 
0046 # Set up libraries using particular algebra plugins.
0047 detray_add_library( detray_io_array io_array )
0048 target_link_libraries(
0049     detray_io_array
0050     INTERFACE detray::io detray::algebra_array
0051 )
0052 
0053 if(DETRAY_EIGEN_PLUGIN)
0054     detray_add_library( detray_io_eigen io_eigen )
0055     target_link_libraries(
0056         detray_io_eigen
0057         INTERFACE detray::io detray::algebra_eigen
0058     )
0059 endif()
0060 
0061 if(DETRAY_SMATRIX_PLUGIN)
0062     detray_add_library( detray_io_smatrix io_smatrix )
0063     target_link_libraries(
0064         detray_io_smatrix
0065         INTERFACE detray::io detray::algebra_smatrix
0066     )
0067 endif()
0068 
0069 if(DETRAY_VC_AOS_PLUGIN)
0070     detray_add_library( detray_io_vc_aos io_vc_aos )
0071     target_link_libraries(
0072         detray_io_vc_aos
0073         INTERFACE detray::io detray::algebra_vc_aos
0074     )
0075 endif()
0076 
0077 # Set up the csv data I/O library.
0078 file(
0079     GLOB _detray_csv_io_public_headers
0080     RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
0081     "include/detray/io/csv/*.hpp"
0082 )
0083 detray_add_library( detray_csv_io csv_io
0084    ${_detray_csv_io_public_headers}
0085 )
0086 target_link_libraries(detray_csv_io INTERFACE detray::io_utils)
0087 
0088 # Test the public headers of the detray I/O libraries.
0089 if(BUILD_TESTING AND DETRAY_BUILD_TESTING)
0090     string(
0091         REPLACE "include/"
0092         ""
0093         _detray_io_utils_public_headers
0094         "${_detray_io_utils_public_headers}"
0095     )
0096 
0097     string(
0098         REPLACE "include/"
0099         ""
0100         _detray_io_public_headers
0101         "${_detray_io_public_headers}"
0102     )
0103     detray_test_public_headers(detray_io_array
0104       ${_detray_io_public_headers}
0105     )
0106     if(DETRAY_EIGEN_PLUGIN)
0107         detray_test_public_headers(detray_io_eigen
0108          ${_detray_io_public_headers}
0109         )
0110     endif()
0111     if(DETRAY_SMATRIX_PLUGIN)
0112         detray_test_public_headers(detray_io_smatrix
0113          ${_detray_io_public_headers}
0114         )
0115     endif()
0116     if(DETRAY_VC_AOS_PLUGIN)
0117         detray_test_public_headers(detray_io_vc_aos
0118          ${_detray_io_public_headers}
0119         )
0120     endif()
0121 
0122     string(
0123         REPLACE "include/"
0124         ""
0125         _detray_csv_io_public_headers
0126         "${_detray_csv_io_public_headers}"
0127     )
0128 endif()
0129 
0130 # Clean up.
0131 unset(_detray_io_public_headers)