From 9bd6cec74dbbc5aece55dc0c8808494db29b9963 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 11 Oct 2019 14:35:35 +0200 Subject: pro2cmake: Translate C++ standard version checks Translate checks like contains(QT_CONFIG, c++11) to cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES Also allows contains(CONFIG, c++11) and different versions of course. Change-Id: I0f51a1ee7c92df6b87c31d0fb64c22fdba2002ec Reviewed-by: Simon Hausmann Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 1 + 1 file changed, 1 insertion(+) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 18855e66b4..8d3514a3ba 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1227,6 +1227,7 @@ def map_condition(condition: str) -> str: condition = unwrap_if(condition) condition = re.sub(r"\bisEmpty\s*\((.*?)\)", r"\1_ISEMPTY", condition) + condition = re.sub(r"\bcontains\s*\(\s*(?:QT_)?CONFIG\s*,\s*c\+\+(\d+)\)", r"cxx_std_\1 IN_LIST CMAKE_CXX_COMPILE_FEATURES", condition) condition = re.sub(r'\bcontains\s*\((.*?),\s*"?(.*?)"?\)', r"\1___contains___\2", condition) condition = re.sub(r'\bequals\s*\((.*?),\s*"?(.*?)"?\)', r"\1___equals___\2", condition) condition = re.sub(r'\bisEqual\s*\((.*?),\s*"?(.*?)"?\)', r"\1___equals___\2", condition) -- cgit v1.2.3