We already enable this by default in our rpm builds. Adding it here as
well increases the odds we'll catch things with make check and local
testing.
Signed-off-by: Samuel Just <sjust@redhat.com>
endif()
endif(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+CHECK_C_COMPILER_FLAG("-D_GLIBCXX_ASSERTIONS" HAS_GLIBCXX_ASSERTIONS)
+if(HAS_GLIBCXX_ASSERTIONS AND CMAKE_BUILD_TYPE STREQUAL Debug)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_ASSERTIONS")
+endif()
+
include(SIMDExt)
if(HAVE_INTEL)
set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/yasm-wrapper)