Skip to content

Commit

Permalink
fix CUDA debug mode to actually permit kernel debugging. Why isn't this
Browse files Browse the repository at this point in the history
set correctly by default in CMake?
  • Loading branch information
Jeremy Buhler committed Aug 14, 2019
1 parent c8938f6 commit 28ce98c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/CMakeLists.txt
Expand Up @@ -32,18 +32,18 @@ set (CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -UNDEBUG -Wall")

set (CMAKE_CUDA_FLAGS_DEBUG
"${CMAKE_CUDA_FLAGS_DEBUG} -UNDEBUG")
"${CMAKE_CUDA_FLAGS_DEBUG} -G -UNDEBUG")

set (CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")

set (CMAKE_CUDA_FLAGS_RELEASE
"${CMAKE_CUDA_FLAGS_RELEASE} -DNDEBUG")
"${CMAKE_CUDA_FLAGS_RELEASE} -lineinfo -DNDEBUG")

set(ARCHFLAGS -arch compute_61 -code sm_61)
set(WARNFLAGS -Xcompiler -Wall -Xcudafe --diag_suppress=unsigned_compare_with_zero -Xptxas --suppress-stack-size-warning)

string(JOIN " " NVCCFLAGS ${ARCHFLAGS} ${WARNFLAGS} -lineinfo)
string(JOIN " " NVCCFLAGS ${ARCHFLAGS} ${WARNFLAGS})

string(APPEND CMAKE_CUDA_FLAGS ${NVCCFLAGS})

Expand Down

0 comments on commit 28ce98c

Please sign in to comment.