From 1c655d96a1390600664ed1e68769809b7413aa48 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Mon, 6 Jan 2025 18:06:25 +0000 Subject: [PATCH] tests: Run with -fhardened --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c6ffa3c3..edf8cd328 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,6 +162,13 @@ else() set(QT_MIN_VERSION "5.15") endif() +if(KDDockWidgets_DEVELOPER_MODE + AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "14.1" +) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fhardened -O1") +endif() + # BEGIN frontend enabling set(KDDW_FRONTEND_QTWIDGETS OFF)