CMakeLists.txt 825 Bytes
Newer Older
1
# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Tim Moon's avatar
Tim Moon committed
2
3
4
#
# See LICENSE for license information.

yuguo's avatar
yuguo committed
5
if(USE_CUDA)
Tim Moon's avatar
Tim Moon committed
6
7
8
9
10
add_executable(test_util
               test_nvrtc.cpp
               test_string.cpp
               ../test_common.cu)

11

12
13
find_package(OpenMP REQUIRED)
target_link_libraries(test_util PUBLIC CUDA::cudart GTest::gtest_main ${TE_LIB} CUDA::nvrtc CUDNN::cudnn  OpenMP::OpenMP_CXX)
yuguo's avatar
yuguo committed
14
15
16
17
18
19
20
21
22
23
else()
add_executable(test_util
               test_nvrtc_hip.cpp
               test_string.cpp
               ../test_common.hip)


find_package(OpenMP REQUIRED)
target_link_libraries(test_util PUBLIC hip::host hip::device GTest::gtest_main ${TE_LIB} OpenMP::OpenMP_CXX)
endif()
24
target_compile_options(test_util PRIVATE -O2 -fopenmp)
Tim Moon's avatar
Tim Moon committed
25
26

include(GoogleTest)
27
gtest_discover_tests(test_util DISCOVERY_TIMEOUT 600)