From 7e4361ffbde92f1530ea8b8ea586db05463de1da Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 6 Mar 2020 13:34:59 +0100 Subject: [PATCH] CMake: "Port" the c89, c99 and c11 features We can ignore the tests for those features and directly ask CMake whether the compiler supports the respective language version. Change-Id: I31cd35493443fea0c6d0b0a5e641768c3bcbe736 Reviewed-by: Alexandru Croitor --- configure.cmake | 11 +++++++++++ util/cmake/configurejson2cmake.py | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configure.cmake b/configure.cmake index 99ec9e7b339..08def15a9fe 100644 --- a/configure.cmake +++ b/configure.cmake @@ -474,6 +474,17 @@ qt_feature("c++2a" PUBLIC CONDITION QT_FEATURE_cxx17 AND TEST_cxx2a ) qt_feature_config("c++2a" QMAKE_PUBLIC_QT_CONFIG) +qt_feature("c89" + LABEL "C89" +) +qt_feature("c99" PUBLIC + LABEL "C99" + CONDITION c_std_99 IN_LIST CMAKE_C_COMPILE_FEATURES +) +qt_feature("c11" PUBLIC + LABEL "C11" + CONDITION QT_FEATURE_c99 AND c_std_11 IN_LIST CMAKE_C_COMPILE_FEATURES +) qt_feature("reduce_exports" PRIVATE LABEL "Reduce amount of exported symbols" CONDITION NOT WIN32 AND CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 64ab5b749c6..afee5156a05 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -761,9 +761,6 @@ def get_feature_mapping(): "alloc_malloc_h": None, "alloc_stdlib_h": None, "build_all": None, - "c11": None, - "c89": None, - "c99": None, "ccache": None, "compiler-flags": None, "cross_compile": None,