summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-04-24 12:55:54 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-04-24 12:55:54 +0000
commitd290e2c4f9490a4cd9692233e3186510845a24b8 (patch)
treec82f6001f81ccc5b8d9532f8ba07ecdacb3af48e /CMakeScripts
parentTentative fix for poppler 0.76 (diff)
downloadinkscape-d290e2c4f9490a4cd9692233e3186510845a24b8.tar.gz
inkscape-d290e2c4f9490a4cd9692233e3186510845a24b8.zip
add _GLIBCXX_ASSERTIONS flag to detect OOB accesses in debug builds
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 397ca9468..6373314fa 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -14,6 +14,7 @@ list(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format") # e.g.: printf("%s", std::string("foo"))
list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format-security") # e.g.: printf(variable);
list(APPEND INKSCAPE_CXX_FLAGS "-D_FORTIFY_SOURCE=2")
+list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-D_GLIBCXX_ASSERTIONS")
if (CMAKE_COMPILER_IS_GNUCC)
list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-Og") # for _FORTIFY_SOURCE
list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables")