Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/Detray/tests/tools/src/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 device command line tools")
0010 
0011 find_package(HIPToolkit)
0012 
0013 # Enable HIP as a language.
0014 enable_language(HIP)
0015 
0016 include(CMakeFindDependencyMacro)
0017 
0018 find_dependency(Boost COMPONENTS program_options REQUIRED)
0019 
0020 if(DETRAY_BUILD_BENCHMARKS)
0021     # Build benchmarks for multiple algebra plugins
0022     # Currently vc and smatrix is not supported on device
0023     set(algebra_plugins "array")
0024     if(DETRAY_EIGEN_PLUGIN)
0025         list(APPEND algebra_plugins "eigen")
0026     endif()
0027 
0028     foreach(algebra ${algebra_plugins})
0029         detray_add_executable(propagation_benchmark_hip_${CMAKE_HIP_PLATFORM}_${algebra}
0030         "propagation_benchmark_hip.cpp"
0031         LINK_LIBRARIES detray::benchmark_hip_${CMAKE_HIP_PLATFORM}_${algebra} HIP::hiprt vecmem::hip detray::tools detray::test_common
0032         )
0033         # Make hipcc interpret .cpp files as .hip files to make linking work
0034         # (only needed for the amd backend)
0035         if(
0036             ("${CMAKE_HIP_PLATFORM}" STREQUAL "hcc")
0037             OR ("${CMAKE_HIP_PLATFORM}" STREQUAL "amd")
0038         )
0039             set_source_files_properties(
0040                 propagation_benchmark_hip.cpp
0041                 PROPERTIES LANGUAGE HIP
0042             )
0043         endif()
0044         target_compile_definitions(
0045             detray_propagation_benchmark_hip_${CMAKE_HIP_PLATFORM}_${algebra}
0046             PRIVATE HIP_PLATFORM_NAME="${CMAKE_HIP_PLATFORM}"
0047         )
0048     endforeach()
0049 endif()