Skip to content
Snippets Groups Projects
Commit 9ffc202b authored by Soeren Peters's avatar Soeren Peters
Browse files

Need to set CUDA_STANDARD at least to 11 with msvc.

parent f5f9caf5
No related branches found
No related tags found
1 merge request!27Remove GPU compiler warnings (Closes #4, #12)
...@@ -103,13 +103,16 @@ if(BUILD_VF_GPU) ...@@ -103,13 +103,16 @@ if(BUILD_VF_GPU)
message(FATAL_ERROR "CUDA Compiler was requested but is not found on the system.") message(FATAL_ERROR "CUDA Compiler was requested but is not found on the system.")
endif() endif()
if(NOT MSVC) if(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. # 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. # But we build the c++ code with C++14. Until we have not a solution here, we set the standard to 11 here.
set(CMAKE_CUDA_STANDARD 11)
else()
set(CMAKE_CUDA_STANDARD 14) set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
endif() endif()
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcudafe --display_error_number") set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcudafe --display_error_number")
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment