summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-06-02 19:14:26 (GMT)
committerRaul Tambre <raul@tambre.ee>2020-06-03 05:10:57 (GMT)
commitb1243201e78b8ee403f1aa696a4a7f6f158caafb (patch)
tree8ef297c37eeb3195c7233ea52b4b3d59cd673dda /Tests/RunCMake
parent1b4c690543451e1907a5b3df23eb76385ab87ada (diff)
downloadCMake-b1243201e78b8ee403f1aa696a4a7f6f158caafb.zip
CMake-b1243201e78b8ee403f1aa696a4a7f6f158caafb.tar.gz
CMake-b1243201e78b8ee403f1aa696a4a7f6f158caafb.tar.bz2
CUDA: Don't RunCMake generate separable compilation tests on Clang
Building these targets was already previously disabled in RunCMakeTest.cmake. Now with us throwing an error for separable compilation during generation on Clang we also need to stop them from being generated.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake33
1 files changed, 18 insertions, 15 deletions
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake
index 4d0c02f..0126080 100644
--- a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake
@@ -21,26 +21,29 @@ target_link_options (LinkOptions_private PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEV
if (CMake_TEST_CUDA)
enable_language(CUDA)
- add_executable(LinkOptions_CMP0105_UNSET LinkOptionsDevice.cu)
- set_property(TARGET LinkOptions_CMP0105_UNSET PROPERTY CUDA_SEPARABLE_COMPILATION ON)
- target_link_options(LinkOptions_CMP0105_UNSET PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
+ # Separable compilation is only supported on NVCC.
+ if(NOT CMake_TEST_CUDA STREQUAL "Clang")
+ add_executable(LinkOptions_CMP0105_UNSET LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_CMP0105_UNSET PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_CMP0105_UNSET PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
- cmake_policy(SET CMP0105 OLD)
+ cmake_policy(SET CMP0105 OLD)
- add_executable(LinkOptions_CMP0105_OLD LinkOptionsDevice.cu)
- set_property(TARGET LinkOptions_CMP0105_OLD PROPERTY CUDA_SEPARABLE_COMPILATION ON)
- target_link_options(LinkOptions_CMP0105_OLD PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
+ add_executable(LinkOptions_CMP0105_OLD LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_CMP0105_OLD PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_CMP0105_OLD PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
- cmake_policy(SET CMP0105 NEW)
+ cmake_policy(SET CMP0105 NEW)
- add_executable(LinkOptions_CMP0105_NEW LinkOptionsDevice.cu)
- set_property(TARGET LinkOptions_CMP0105_NEW PROPERTY CUDA_SEPARABLE_COMPILATION ON)
- target_link_options(LinkOptions_CMP0105_NEW PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
+ add_executable(LinkOptions_CMP0105_NEW LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_CMP0105_NEW PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_CMP0105_NEW PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
- add_executable(LinkOptions_device LinkOptionsDevice.cu)
- set_property(TARGET LinkOptions_device PROPERTY CUDA_SEPARABLE_COMPILATION ON)
- target_link_options(LinkOptions_device PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>
- $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>)
+ add_executable(LinkOptions_device LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_device PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_device PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>
+ $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>)
+ endif()
add_executable(LinkOptions_no_device LinkOptionsDevice.cu)
target_link_options(LinkOptions_no_device PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>