diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-03-18 07:04:54 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-03-18 07:04:54 -0700 |
commit | 53d498ef064dddf616af68468ac1cd5375618467 (patch) | |
tree | cd8b33b44223784e4a8b11d00ce10f033b9e8637 /unsupported/test/CMakeLists.txt | |
parent | e10e126cd0abf7b2cd8a53a4c8c30e9a81e42858 (diff) |
Fixed compilation warnings in the cuda tests
Diffstat (limited to 'unsupported/test/CMakeLists.txt')
-rw-r--r-- | unsupported/test/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index e2e5470c8..79c26fb72 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -175,7 +175,11 @@ endif() # These tests needs nvcc find_package(CUDA 7.0) if(CUDA_FOUND) -# set(CUDA_PROPAGATE_HOST_FLAGS OFF) + # Mke sure to compile without the -pedantic and -Wundef flags since they trigger thousands of compilation warnings in the CUDA runtime + string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE "-Wundef" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + message(STATUS "Flags used to compile cuda code: " ${CMAKE_CXX_FLAGS}) + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE) endif() |