diff options
| author | Joerg Bornemann <[email protected]> | 2020-02-26 10:39:47 +0100 |
|---|---|---|
| committer | Joerg Bornemann <[email protected]> | 2020-03-04 16:31:13 +0100 |
| commit | 1a30a828307ac1a27cb20e7b25fe9cb722497631 (patch) | |
| tree | 0ec15af02be3fea69b76042d45132757aa22f6ac /util/cmake/configurejson2cmake.py | |
| parent | fb2f42b6044fe4673e71f3d12082b53c9f3182cd (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 <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
Diffstat (limited to 'util/cmake/configurejson2cmake.py')
| -rwxr-xr-x | util/cmake/configurejson2cmake.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index f4797324065..f22ff2a3c6c 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -584,6 +584,7 @@ endif() librariesCmakeName = "" languageStandard = "" + compileOptions = "" qmakeFixme = "" cm_fh.write(f"# {test}\n") @@ -612,6 +613,8 @@ endif() languageStandard = "CXX_STANDARD 17" elif details["qmake"] == "CONFIG += c++11 c++14 c++17 c++2a": languageStandard = "CXX_STANDARD 20" + elif details["qmake"] == "QMAKE_CXXFLAGS += -fstack-protector-strong": + compileOptions = details["qmake"][18:] else: qmakeFixme = f"# FIXME: qmake: {details['qmake']}\n" @@ -637,6 +640,8 @@ endif() cm_fh.write(" ") cm_fh.write("\n ".join(library_list)) cm_fh.write("\n") + if compileOptions != "": + cm_fh.write(f" COMPILE_OPTIONS {compileOptions}\n") cm_fh.write(" CODE\n") cm_fh.write('"' + sourceCode + '"') if qmakeFixme != "": @@ -755,7 +760,6 @@ def parseFeature(ctx, feature, data, cm_fh): "shared": None, "silent": None, "sql-sqlite": {"condition": "QT_FEATURE_datestring AND SQLite3_FOUND"}, - "stack-protector-strong": None, "static": None, "static_runtime": None, "stl": None, # Do we really need to test for this in 2018?! |
