Manually add -stdd=c++11 to nvcc for old cmake versions

This commit is contained in:
Gael Guennebaud 2016-07-12 09:29:18 +02:00
parent 013a904237
commit c98bac2966

View File

@ -213,7 +213,7 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA)
set(EIGEN_CUDA_RELAXED_CONSTEXPR "--relaxed-constexpr")
endif()
if(NOT EIGEN_TEST_CXX11)
if( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3))
set(EIGEN_CUDA_CXX11_FLAG "-std=c++11")
else()
# otherwise the flag has already been added because of the above set(CMAKE_CXX_STANDARD 11)