From 1a30a828307ac1a27cb20e7b25fe9cb722497631 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 26 Feb 2020 10:39:47 +0100 Subject: 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 Reviewed-by: Alexandru Croitor --- configure.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure.cmake') 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 @@ -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 -- cgit v1.2.3