diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-10-11 14:35:35 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-10-11 12:49:26 +0000 |
commit | 9bd6cec74dbbc5aece55dc0c8808494db29b9963 (patch) | |
tree | 9df37c3c3549320f7b7bd691186afb2c8e2d0da3 /util/cmake/pro2cmake.py | |
parent | dd57f9900478cdec615e25660a9336f8c25ab043 (diff) |
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 <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util/cmake/pro2cmake.py')
-rwxr-xr-x | util/cmake/pro2cmake.py | 1 |
1 files changed, 1 insertions, 0 deletions
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) |