diff options
Diffstat (limited to 'Tests/CudaOnly/WithDefs/CMakeLists.txt')
-rw-r--r-- | Tests/CudaOnly/WithDefs/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index c4ca8b9..6c4011c 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -4,7 +4,12 @@ project (CudaOnlyWithDefs CUDA) #verify that we can pass explicit cuda arch flags set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30") -set(debug_compile_flags --generate-code arch=compute_20,code=sm_20 -Xcompiler=-Werror) +set(debug_compile_flags --generate-code arch=compute_20,code=sm_20) +if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + list(APPEND debug_compile_flags -Xcompiler=-WX) +else() + list(APPEND debug_compile_flags -Xcompiler=-Werror) +endif() set(release_compile_defs DEFREL) #Goal for this example: |