@@ -65,9 +65,10 @@ if(MSVC AND CMAKE_GENERATOR MATCHES "Ninja")
6565 list (APPEND CUDA_NVCC_FLAGS -Xcompiler ${CCTAG_MVSC_LINKER} )
6666endif ()
6767
68- set (CMAKE_CXX_STANDARD 11)
68+ set (CCTAG_CXX_STANDARD 14)
69+ set (CMAKE_CXX_STANDARD ${CCTAG_CXX_STANDARD} )
6970set (CMAKE_CXX_STANDARD_REQUIRED ON )
70- set (CMAKE_CUDA_STANDARD 11 )
71+ set (CMAKE_CUDA_STANDARD ${CCTAG_CXX_STANDARD} )
7172set (CMAKE_CUDA_STANDARD_REQUIRED ON )
7273
7374
@@ -94,12 +95,6 @@ endif()
9495# set the path where we can find the findXXX.cmake
9596set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR} /cmake" )
9697
97- if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
98- # -Wno-c++11-narrowing to solve "non-type template argument evaluates to -1" error in boost::gil
99- # -Wno-deprecated-register to avoid the noise of some older eigen versions
100- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-extensions -Wno-c++11-narrowing -Wno-deprecated-register" )
101- endif ()
102-
10398if (APPLE )
10499
105100 # avoid the cmake policy warning about @rpath in MacOSX
@@ -186,7 +181,7 @@ if(CCTAG_WITH_CUDA)
186181 LIST (APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS} )
187182
188183 if (NOT MSVC )
189- set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ;-std=c++11 " )
184+ set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ;-std=c++${CCTAG_CXX_STANDARD} " )
190185 endif ()
191186 set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ;--default-stream;per-thread" )
192187
@@ -204,6 +199,12 @@ if(CCTAG_WITH_CUDA)
204199 endif ()
205200 endif ()
206201
202+ # This is needed on windows for the multi-threaded compilation, typically ninja and vcpkg
203+ # it avoids the error C1041: cannot open program database, write to the same .PDB file because of concurrent access
204+ if (MSVC )
205+ list (APPEND CUDA_NVCC_FLAGS "-Xcompiler" "-FS" )
206+ endif ()
207+
207208 if (CCTAG_NVCC_WARNINGS)
208209 list (APPEND CUDA_NVCC_FLAGS -Xptxas --warn-on -local-memory-usage)
209210 list (APPEND CUDA_NVCC_FLAGS -Xptxas --warn-on -spills)
0 commit comments