CMake defines -DNDEBUG when BUILD_TYPE is set to RELEASE by default however default flags gets dropped when CMAKE_C_FLAGS_RELEASE and CMAKE_CXX_FLAGS_RELEASE are (re)defined. This causes some projects to build with debugging by default which needs to be disabled manually if they're do not set -DNDEBUG manually either in ports Makefile and/or in CMake's Makefile. To follow upstream add -DNDEBUG to our RELEASE flags.