summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-11-18 17:25:17 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2024-11-18 19:23:01 +0100
commitfb060abb1420d345e2e79245fa02046ddcd1a57d (patch)
tree8fb60b799afa6a62d28f32784aace217374eb22c
parentdc980fb9ad9f8590a9d438c3f10ef98418e44934 (diff)
Add -Wp,-D_GLIBCXX_ASSERTIONS to CXXFLAGS
This ensures some more hardening of all our container accesses, preventing out of bounds. Especially now that we moved a lot of C-style arrays to std::array.
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4ea1660a..9d766c50d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,7 @@ add_optional_compile_options(Wdouble-promotion)
add_optional_compile_options(Wsuggest-override)
add_optional_compile_options(Werror=suggest-override)
add_optional_compile_options(Werror=return-type)
+add_optional_compile_options(Wp,-D_GLIBCXX_ASSERTIONS)
# apt-ftparchive dependencies
find_package(Berkeley REQUIRED)
if (BERKELEY_FOUND)