File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -202,9 +202,9 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
202
202
# Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc.
203
203
# So, don't set these flags here.
204
204
if (NOT WIN32 ) # windows msvc2015 support c++11 natively.
205
- # -std=c++11 -fPIC not recoginize by msvc, -Xcompiler will be added by cmake.
206
- list (APPEND CUDA_NVCC_FLAGS "-std=c++11" )
207
- list (APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC" )
205
+ # -std=c++11 -fPIC not recoginize by msvc, -Xcompiler will be added by cmake.
206
+ list (APPEND CUDA_NVCC_FLAGS "-std=c++11" )
207
+ list (APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC" )
208
208
endif (NOT WIN32 )
209
209
210
210
# in cuda9, suppress cuda warning on eigen
@@ -226,6 +226,11 @@ if (NOT WIN32)
226
226
else (NOT WIN32 )
227
227
list (APPEND CUDA_NVCC_FLAGS "-Xcompiler \" /wd 4244 /wd 4267 /wd 4819\" " )
228
228
list (APPEND CUDA_NVCC_FLAGS "--compiler-options;/bigobj" )
229
+ if (MSVC_STATIC_CRT )
230
+ list (APPEND CUDA_NVCC_FLAGS "-Xcompiler" "-MT$<$<CONFIG:Debug>:d>" )
231
+ else ()
232
+ list (APPEND CUDA_NVCC_FLAGS "-Xcompiler" "-MD$<$<CONFIG:Debug>:d>" )
233
+ endif ()
229
234
if (CMAKE_BUILD_TYPE STREQUAL "Debug" )
230
235
list (APPEND CUDA_NVCC_FLAGS "-g -G" )
231
236
# match the cl's _ITERATOR_DEBUG_LEVEL
Original file line number Diff line number Diff line change @@ -217,8 +217,8 @@ foreach(flag ${GPU_COMMON_FLAGS})
217
217
endforeach ()
218
218
219
219
if (WIN32 AND MSVC_STATIC_CRT )
220
- # windows build turn off warnings.
221
- safe_set_static_flag ()
220
+ # windows build turn off warnings.
221
+ safe_set_static_flag ()
222
222
foreach (flag_var
223
223
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
224
224
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
You can’t perform that action at this time.
0 commit comments