CMake is being used to compile some C++ files. There are assert
calls in the code. These calls are disabled in Release mode of CMake. It defines NDEBUG
in Release mode, I guess.
If I'm interested in having assert in Release mode of CMake, how do I enable it?
See this answer in the CMake FAQ, i.e.:
Fix it manually by changing the definition of the cache variables CMAKE_C_FLAGS_RELEASE
and CMAKE_CXX_FLAGS_RELEASE
. This has to be done every time you set up a new build directory.
To fix it permanently, create a custom CMake rules file in your source folder with the desired settings for the release flags (omit the option /D NDEBUG
). Then in your outermost CMakeLists.txt point the variable CMAKE_USER_MAKE_RULES_OVERRIDE
to the custom CMake rules file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With