Warning, /acts/Detray/tests/integration_tests/device/hip/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 HIP integration tests")
0010
0011 # HIP language support requires minimum 3.21
0012 cmake_minimum_required(VERSION 3.21)
0013
0014 find_package(HIPToolkit)
0015
0016 # Enable HIP as a language.
0017 enable_language(HIP)
0018
0019 # Set the HIP build flags.
0020 include(detray-compiler-options-hip)
0021
0022 # make unit tests for multiple algebras
0023 # Currently vc and smatrix is not supported
0024 set(algebras "array")
0025
0026 if(DETRAY_EIGEN_PLUGIN)
0027 list(APPEND algebras "eigen")
0028 endif()
0029
0030 foreach(algebra ${algebras})
0031 # Unit tests for the selected algebra.
0032 detray_add_integration_test(hip_${CMAKE_HIP_PLATFORM}_${algebra}
0033 "propagator_hip_kernel.hpp"
0034 "propagator_hip.cpp"
0035 "propagator_hip_kernel.hip"
0036 LINK_LIBRARIES GTest::gtest_main
0037 HIP::hiprt vecmem::hip #covfie::hip
0038 detray::core detray::algebra_${algebra} detray::test_device
0039 detray::test_common
0040 )
0041 # Make hipcc interpret .cpp files as .hip files to make linking work
0042 # (only needed for the amd backend)
0043 if(
0044 ("${CMAKE_HIP_PLATFORM}" STREQUAL "hcc")
0045 OR ("${CMAKE_HIP_PLATFORM}" STREQUAL "amd")
0046 )
0047 set_source_files_properties(propagator_hip.cpp PROPERTIES LANGUAGE HIP)
0048 endif()
0049
0050 target_compile_definitions(
0051 detray_integration_test_hip_${CMAKE_HIP_PLATFORM}_${algebra}
0052 PRIVATE ${algebra}=${algebra}
0053 )
0054
0055 set_tests_properties(
0056 detray_integration_test_hip_${CMAKE_HIP_PLATFORM}_${algebra}
0057 PROPERTIES
0058 DEPENDS "detray_unit_test_hip_${CMAKE_HIP_PLATFORM}_${algebra}"
0059 )
0060 endforeach()