Skip to content

Commit

Permalink
gdal.cmake: set -DDEBUG for CMAKE_BUILD_TYPE=Debug for Windows builds…
Browse files Browse the repository at this point in the history
… as well
  • Loading branch information
rouault committed Jan 13, 2024
1 parent a94251f commit bfed070
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gdal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ else ()
endif ()

if (CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DDEBUG)
check_c_compiler_flag(-ftrapv HAVE_FTRAPV)
if (HAVE_FTRAPV)
set(GDAL_C_WARNING_FLAGS ${GDAL_C_WARNING_FLAGS} -ftrapv)
Expand All @@ -199,6 +198,8 @@ else ()

endif ()

add_compile_definitions($<$<CONFIG:DEBUG>:DEBUG>)

# message(STATUS "GDAL_C_WARNING_FLAGS: ${GDAL_C_WARNING_FLAGS}") message(STATUS "GDAL_CXX_WARNING_FLAGS: ${GDAL_CXX_WARNING_FLAGS}")

if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
Expand Down

0 comments on commit bfed070

Please sign in to comment.