diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-08 20:31:44 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-11 17:04:33 (GMT) |
commit | 1a2961b8958e126f7ae6d6fe125bc4fb453f2de4 (patch) | |
tree | b6408d97e7e40f12d25657d94164a228722d6f05 /Tests/CudaOnly | |
parent | 2caa7502d523316d431c18b26e72e6cdd2577df8 (diff) | |
download | CMake-1a2961b8958e126f7ae6d6fe125bc4fb453f2de4.zip CMake-1a2961b8958e126f7ae6d6fe125bc4fb453f2de4.tar.gz CMake-1a2961b8958e126f7ae6d6fe125bc4fb453f2de4.tar.bz2 |
Tests: add CUDA labels to tests which are affected by CUDA
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r-- | Tests/CudaOnly/CMakeLists.txt | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt index 8244b91..7376a73 100644 --- a/Tests/CudaOnly/CMakeLists.txt +++ b/Tests/CudaOnly/CMakeLists.txt @@ -1,21 +1,26 @@ +macro (add_cuda_test_macro name) + add_test_macro("${name}" ${ARGN}) + set_property(TEST "${name}" APPEND + PROPERTY LABELS "CUDA") +endmacro () -ADD_TEST_MACRO(CudaOnly.Architecture Architecture) -ADD_TEST_MACRO(CudaOnly.CompileFlags CudaOnlyCompileFlags) -ADD_TEST_MACRO(CudaOnly.EnableStandard CudaOnlyEnableStandard) -ADD_TEST_MACRO(CudaOnly.ExportPTX CudaOnlyExportPTX) -ADD_TEST_MACRO(CudaOnly.SharedRuntimePlusToolkit CudaOnlySharedRuntimePlusToolkit) -ADD_TEST_MACRO(CudaOnly.Standard98 CudaOnlyStandard98) -ADD_TEST_MACRO(CudaOnly.Toolkit CudaOnlyToolkit) -ADD_TEST_MACRO(CudaOnly.WithDefs CudaOnlyWithDefs) +add_cuda_test_macro(CudaOnly.Architecture Architecture) +add_cuda_test_macro(CudaOnly.CompileFlags CudaOnlyCompileFlags) +add_cuda_test_macro(CudaOnly.EnableStandard CudaOnlyEnableStandard) +add_cuda_test_macro(CudaOnly.ExportPTX CudaOnlyExportPTX) +add_cuda_test_macro(CudaOnly.SharedRuntimePlusToolkit CudaOnlySharedRuntimePlusToolkit) +add_cuda_test_macro(CudaOnly.Standard98 CudaOnlyStandard98) +add_cuda_test_macro(CudaOnly.Toolkit CudaOnlyToolkit) +add_cuda_test_macro(CudaOnly.WithDefs CudaOnlyWithDefs) if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang") - ADD_TEST_MACRO(CudaOnly.SharedRuntimeViaCUDAFlags CudaOnlySharedRuntimeViaCUDAFlags) + add_cuda_test_macro(CudaOnly.SharedRuntimeViaCUDAFlags CudaOnlySharedRuntimeViaCUDAFlags) # Separable compilation is currently only supported on NVCC. Disable tests # using it for other compilers. - ADD_TEST_MACRO(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine) - ADD_TEST_MACRO(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols) - ADD_TEST_MACRO(CudaOnly.SeparateCompilation CudaOnlySeparateCompilation) + add_cuda_test_macro(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine) + add_cuda_test_macro(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols) + add_cuda_test_macro(CudaOnly.SeparateCompilation CudaOnlySeparateCompilation) add_test(NAME CudaOnly.DontResolveDeviceSymbols COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> @@ -27,19 +32,21 @@ if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang") --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) + set_property(TEST "CudaOnly.DontResolveDeviceSymbols" APPEND + PROPERTY LABELS "CUDA") # Only NVCC defines __CUDACC_DEBUG__ when compiling in debug mode. - ADD_TEST_MACRO(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag) + add_cuda_test_macro(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag) endif() # The CUDA only ships the shared version of the toolkit libraries # on windows if(NOT WIN32) - ADD_TEST_MACRO(Cuda.StaticRuntimePlusToolkit StaticRuntimePlusToolkit) + add_cuda_test_macro(CudaOnly.StaticRuntimePlusToolkit CudaOnlyStaticRuntimePlusToolkit) endif() if(MSVC) - ADD_TEST_MACRO(CudaOnly.PDB CudaOnlyPDB) + add_cuda_test_macro(CudaOnly.PDB CudaOnlyPDB) endif() add_test(NAME CudaOnly.RuntimeControls COMMAND @@ -53,3 +60,5 @@ add_test(NAME CudaOnly.RuntimeControls COMMAND --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) +set_property(TEST "CudaOnly.RuntimeControls" APPEND + PROPERTY LABELS "CUDA") |