summaryrefslogtreecommitdiffstats
path: root/configure.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-02-26 10:39:47 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-03-04 16:31:13 +0100
commit1a30a828307ac1a27cb20e7b25fe9cb722497631 (patch)
tree0ec15af02be3fea69b76042d45132757aa22f6ac /configure.cmake
parentfb2f42b6044fe4673e71f3d12082b53c9f3182cd (diff)
CMake: Fix stack-protector-strong test and feature
And in order to do this we must teach qt_config_compile_test a COMPILE_OPTIONS argument. Change-Id: I66fa45142b544e3a2fc599af1c1a4c69b442b318 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.cmake b/configure.cmake
index cfb1d58604..45f5ba0ef4 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -283,6 +283,7 @@ alloca(1);
# stack_protector
qt_config_compile_test(stack_protector
LABEL "stack protection"
+ COMPILE_OPTIONS -fstack-protector-strong
CODE
"#ifdef __QNXNTO__
# include <sys/neutrino.h>
@@ -300,8 +301,7 @@ int main(int argc, char **argv)
/* END TEST: */
return 0;
}
-"# FIXME: qmake: QMAKE_CXXFLAGS += -fstack-protector-strong
-)
+")
@@ -619,6 +619,10 @@ qt_feature("alloca" PRIVATE
LABEL "alloca()"
CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h
)
+qt_feature("stack-protector-strong" PRIVATE
+ LABEL "stack protection"
+ CONDITION QNX AND TEST_stack_protector
+)
qt_feature("system-zlib" PRIVATE
LABEL "Using system zlib"
CONDITION ZLIB_FOUND