Skip to content

Commit a89ed69

Browse files
committed
Merge branch 'windows/build' into windows/online
2 parents ba562bc + 7aadb68 commit a89ed69

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmake/cuda.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,13 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
199199
list(APPEND CUDA_NVCC_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
200200
endif()
201201
else(NOT WIN32)
202+
list(APPEND CUDA_NVCC_FLAGS "--compiler-options;/bigobj")
202203
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
203-
list(APPEND CUDA_NVCC_FLAGS "-g -G --compiler-options;/bigobj")
204+
list(APPEND CUDA_NVCC_FLAGS "-g -G")
205+
# match the cl's _ITERATOR_DEBUG_LEVEL
206+
list(APPEND CUDA_NVCC_FLAGS "-D_DEBUG")
204207
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
205-
list(APPEND CUDA_NVCC_FLAGS "-O3 -DNDEBUG --compiler-options;/bigobj")
208+
list(APPEND CUDA_NVCC_FLAGS "-O3 -DNDEBUG")
206209
else()
207210
message(FATAL "Windows only support Release or Debug build now. Please set visual studio build type to Release/Debug, x64 build.")
208211
endif()

0 commit comments

Comments
 (0)