diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ffbb4b4ed6ba064c3072b73213ff4408724a36f..b933f634f64d4840bde78743d687f577da4fa21e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,8 +103,12 @@ if(BUILD_VF_GPU) message(FATAL_ERROR "CUDA Compiler was requested but is not found on the system.") endif() - set(CMAKE_CUDA_STANDARD 11) - set(CMAKE_CUDA_STANDARD_REQUIRED TRUE) + if(NOT MSVC) + # With the MSVC compiler we got this warning: nvcc : The -std=c++14 flag is not supported with the configured host compiler. Flag will be ignored. + # But we build the c++ code with C++14. Until we have not a solution here, we are not setting this on MSVC. + set(CMAKE_CUDA_STANDARD 14) + set(CMAKE_CUDA_STANDARD_REQUIRED TRUE) + endif() set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcudafe --display_error_number")