Warning, /acts/Detray/tests/tools/src/cpu/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 message(STATUS "Building detray host command line tools")
0010
0011 include(CMakeFindDependencyMacro)
0012
0013 find_dependency(Boost COMPONENTS program_options)
0014
0015 # Generate test detectors
0016 detray_add_executable(generate_toy_detector
0017 "generate_toy_detector.cpp"
0018 LINK_LIBRARIES Boost::program_options detray::tools
0019 detray::io detray::test_common detray::test_utils detray::core_array
0020 )
0021
0022 detray_add_executable(generate_wire_chamber
0023 "generate_wire_chamber.cpp"
0024 LINK_LIBRARIES Boost::program_options detray::tools
0025 detray::io detray::test_common detray::test_utils detray::core_array
0026 )
0027
0028 detray_add_executable(generate_telescope_detector
0029 "generate_telescope_detector.cpp"
0030 LINK_LIBRARIES Boost::program_options detray::tools
0031 detray::io detray::test_common detray::test_utils detray::core_array
0032 )
0033
0034 if(DETRAY_SVG_DISPLAY)
0035 # Build the visualization executable.
0036 detray_add_executable(detector_display
0037 "detector_display.cpp"
0038 LINK_LIBRARIES Boost::program_options detray::core_array detray::io detray::tools
0039 detray::svgtools
0040 )
0041 endif()
0042
0043 if(DETRAY_BUILD_TESTING)
0044 # Build the navigation validation executable.
0045 detray_add_executable(navigation_validation
0046 "navigation_validation.cpp"
0047 LINK_LIBRARIES GTest::gtest GTest::gtest_main
0048 Boost::program_options detray::core_array detray::test_cpu detray::tools
0049 )
0050
0051 # Build the material validation executable.
0052 detray_add_executable(material_validation
0053 "material_validation.cpp"
0054 LINK_LIBRARIES GTest::gtest GTest::gtest_main
0055 Boost::program_options detray::core_array detray::test_cpu detray::tools
0056 )
0057 endif()
0058
0059 if(DETRAY_BUILD_BENCHMARKS)
0060 # Look for openMP, which is used for the CPU propagation benchmark
0061 find_package(OpenMP)
0062
0063 # Build the propagation benchmark executable.
0064 macro(detray_add_propagation_benchmark algebra type)
0065 detray_add_executable(propagation_${type}_cpu_${algebra}
0066 "propagation_${type}.cpp"
0067 LINK_LIBRARIES Boost::program_options benchmark::benchmark benchmark::benchmark_main vecmem::core detray::benchmark_cpu detray::core_${algebra} detray::tools detray::detectors
0068 )
0069
0070 if(OpenMP_CXX_FOUND)
0071 target_link_libraries(
0072 detray_propagation_${type}_cpu_${algebra}
0073 PRIVATE OpenMP::OpenMP_CXX
0074 )
0075 endif()
0076 endmacro()
0077
0078 # Build the array benchmark.
0079 detray_add_propagation_benchmark( array benchmark )
0080 detray_add_propagation_benchmark( array scaling )
0081
0082 # Build the Eigen benchmark executable.
0083 if(DETRAY_EIGEN_PLUGIN)
0084 detray_add_propagation_benchmark( eigen benchmark )
0085 detray_add_propagation_benchmark( eigen scaling )
0086 endif()
0087
0088 # Build the SMatrix benchmark executable.
0089 if(DETRAY_SMATRIX_PLUGIN)
0090 detray_add_propagation_benchmark( smatrix benchmark )
0091 detray_add_propagation_benchmark( smatrix scaling )
0092 endif()
0093
0094 # Build the Vc benchmark executable.
0095 if(DETRAY_VC_AOS_PLUGIN)
0096 detray_add_propagation_benchmark( vc_aos benchmark )
0097 detray_add_propagation_benchmark( vc_aos scaling )
0098 endif()
0099 endif()