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

@ -309,6 +309,12 @@ macro(ei_testing_print_summary)
message(STATUS "C++11: OFF")
endif()
if(EIGEN_TEST_NVCC)
message(STATUS "CUDA: ON")
else()
message(STATUS "CUDA: OFF")
endif()
endif() # vectorization / alignment options
message(STATUS "\n${EIGEN_TESTING_SUMMARY}")

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}")