cmake scripts: add mapping for mkspec conditions
Improves for example tests/auto/tools/moc/moc.pro conversion. Change-Id: I80f82be75299a0407be510824df35f0ea101c0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
This commit is contained in:
parent
06fdea1ce5
commit
fbf2759598
@ -1571,6 +1571,13 @@ def map_condition(condition: str) -> str:
|
||||
condition = re.sub(r"\s*==\s*", "___STREQUAL___", condition)
|
||||
condition = re.sub(r"\bexists\s*\((.*?)\)", r"EXISTS \1", condition)
|
||||
|
||||
# checking mkspec, predating gcc scope in qmake, will then be replaced by platform_mapping in helper.py
|
||||
condition = condition.replace("*-g++*", "GCC")
|
||||
condition = condition.replace("*-icc*", "ICC")
|
||||
condition = condition.replace("*-clang*", "CLANG")
|
||||
condition = condition.replace("*-llvm", "CLANG")
|
||||
condition = condition.replace("win32-*", "WIN32")
|
||||
|
||||
pattern = r"CONFIG\((debug|release),debug\|release\)"
|
||||
match_result = re.match(pattern, condition)
|
||||
if match_result:
|
||||
|
Loading…
x
Reference in New Issue
Block a user