Skip to content

Commit

Permalink
Land #988
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq committed Jan 29, 2024
2 parents 7d4657e + f718056 commit c9c2137
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

# Enable asserts regardless of build type
add_definitions(-UNDEBUG)
# Do not disable assertions based on CMAKE_BUILD_TYPE
foreach(_build_type "Release" "MinSizeRel" "RelWithDebInfo")
foreach(_lang C CXX)
string(TOUPPER "CMAKE_${_lang}_FLAGS_${_build_type}" _var)
string(REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " ${_var} "${${_var}}")
endforeach()
endforeach()

set(BUILD_NC true)

Expand Down

0 comments on commit c9c2137

Please sign in to comment.