Warning, /acts/Detray/tests/unit_tests/device/cuda/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 CUDA unit tests")
0010
0011 # C++17 support for CUDA requires CMake 3.18.
0012 cmake_minimum_required(VERSION 3.18)
0013
0014 # Enable CUDA as a language.
0015 enable_language(CUDA)
0016
0017 # Set the CUDA build flags.
0018 include(detray-compiler-options-cuda)
0019
0020 # Independent of algebra-plugin
0021 detray_add_unit_test( cuda
0022 "container_cuda_kernel.hpp"
0023 "container_cuda.cpp"
0024 "container_cuda_kernel.cu"
0025 "utils_ranges_cuda_kernel.hpp"
0026 "utils_ranges_cuda.cpp"
0027 "utils_ranges_cuda_kernel.cu"
0028 LINK_LIBRARIES GTest::gtest_main vecmem::cuda detray::core
0029 )
0030
0031 # Define unit tests for multiple algebra plugins
0032 # Currently, only 'array' and 'eigen' are supported in device code
0033 set(algebras "array")
0034
0035 if(DETRAY_EIGEN_PLUGIN)
0036 list(APPEND algebras "eigen")
0037 endif()
0038
0039 foreach(algebra ${algebras})
0040 # Unit tests for the selected algebra.
0041 detray_add_unit_test(cuda_${algebra}
0042 "algebra.cu"
0043 "detector_cuda_kernel.hpp"
0044 "detector_cuda.cpp"
0045 "detector_cuda_kernel.cu"
0046 "mask_store_cuda_kernel.hpp"
0047 "mask_store_cuda.cpp"
0048 "mask_store_cuda_kernel.cu"
0049 "navigator_cuda_kernel.hpp"
0050 "navigator_cuda.cpp"
0051 "navigator_cuda_kernel.cu"
0052 "sf_finders_grid_cuda_kernel.hpp"
0053 "sf_finders_grid_cuda.cpp"
0054 "sf_finders_grid_cuda_kernel.cu"
0055 "transform_store_cuda_kernel.hpp"
0056 "transform_store_cuda.cpp"
0057 "transform_store_cuda_kernel.cu"
0058 LINK_LIBRARIES GTest::gtest_main
0059 CUDA::cudart vecmem::cuda covfie::cuda detray::core
0060 detray::algebra_${algebra} detray::test_common detray::test_utils
0061 )
0062
0063 target_compile_definitions(
0064 detray_unit_test_cuda_${algebra}
0065 PRIVATE ${algebra}=${algebra}
0066 )
0067 endforeach()