Gate all the CUDA tests under the EIGEN_TEST_NVCC option

This commit is contained in:
Benoit Steiner
2016-03-18 12:17:37 -07:00
parent 2db4a04827
commit bb0e73c191
2 changed files with 7 additions and 1 deletions

View File

@@ -174,7 +174,7 @@ endif()
# These tests needs nvcc
find_package(CUDA 7.0)
if(CUDA_FOUND)
if(CUDA_FOUND AND EIGEN_TEST_NVCC)
# 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}")