diff options
author | Raul Tambre <raul@tambre.ee> | 2020-03-27 19:31:52 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-05-15 15:12:39 (GMT) |
commit | a653ca9504569eb45077ee598945b18a3c9e4ee8 (patch) | |
tree | 9e2753a976a8b43a0cc06587dcc62bb0f3008c84 /Tests/Cuda/ProperLinkFlags | |
parent | 5df21adf46be14061fe0e8ea53213d905e834600 (diff) | |
download | CMake-a653ca9504569eb45077ee598945b18a3c9e4ee8.zip CMake-a653ca9504569eb45077ee598945b18a3c9e4ee8.tar.gz CMake-a653ca9504569eb45077ee598945b18a3c9e4ee8.tar.bz2 |
Tests: Update CUDA tests to work with Clang
Diffstat (limited to 'Tests/Cuda/ProperLinkFlags')
-rw-r--r-- | Tests/Cuda/ProperLinkFlags/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt index b6e0e39..d38da6d 100644 --- a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt +++ b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt @@ -9,11 +9,17 @@ project (ProperLinkFlags CUDA CXX) #Specify a set of valid CUDA flags and an invalid set of CXX flags ( for CUDA ) #to make sure we don't use the CXX flags when linking CUDA executables -string(APPEND CMAKE_CUDA_FLAGS " -arch=sm_35 --use_fast_math") +if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") + string(APPEND CMAKE_CUDA_FLAGS "--use_fast_math") +elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") + string(APPEND CMAKE_CUDA_FLAGS "-ffast-math") +endif() + set(CMAKE_CXX_FLAGS "-Wall") set(CMAKE_CXX_STANDARD 11) set(CMAKE_CUDA_STANDARD 11) +set(CMAKE_CUDA_ARCHITECTURES 35) add_executable(ProperLinkFlags file1.cu main.cxx) set_target_properties( ProperLinkFlags |