Fix pro2cmake formatting
... by running make format. Change-Id: I523a48abd2c483107f5c16c24daa695fcc0a55e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CMake Build Bot
This commit is contained in:
parent
a640db0180
commit
4ff9d6d523
@ -1396,9 +1396,11 @@ def unwrap_if(input_string):
|
|||||||
|
|
||||||
def map_condition(condition: str) -> str:
|
def map_condition(condition: str) -> str:
|
||||||
# Some hardcoded cases that are too bothersome to generalize.
|
# Some hardcoded cases that are too bothersome to generalize.
|
||||||
condition = re.sub(r"qtConfig\(opengles\.\)",
|
condition = re.sub(
|
||||||
|
r"qtConfig\(opengles\.\)",
|
||||||
r"(QT_FEATURE_opengles2 OR QT_FEATURE_opengles3 OR QT_FEATURE_opengles31 OR QT_FEATURE_opengles32)",
|
r"(QT_FEATURE_opengles2 OR QT_FEATURE_opengles3 OR QT_FEATURE_opengles31 OR QT_FEATURE_opengles32)",
|
||||||
condition)
|
condition,
|
||||||
|
)
|
||||||
condition = re.sub(
|
condition = re.sub(
|
||||||
r"qtConfig\(opengl\(es1\|es2\)\?\)",
|
r"qtConfig\(opengl\(es1\|es2\)\?\)",
|
||||||
r"QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3",
|
r"QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3",
|
||||||
@ -1510,12 +1512,10 @@ def map_condition(condition: str) -> str:
|
|||||||
condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition)
|
condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition)
|
||||||
|
|
||||||
# some defines replacements
|
# some defines replacements
|
||||||
condition = re.sub(r"DEFINES___contains___QT_NO_CURSOR",
|
condition = re.sub(r"DEFINES___contains___QT_NO_CURSOR", r"(NOT QT_FEATURE_cursor)", condition)
|
||||||
r"(NOT QT_FEATURE_cursor)",
|
condition = re.sub(
|
||||||
condition)
|
r"DEFINES___contains___QT_NO_TRANSLATION", r"(NOT QT_FEATURE_translation)", condition
|
||||||
condition = re.sub(r"DEFINES___contains___QT_NO_TRANSLATION",
|
)
|
||||||
r"(NOT QT_FEATURE_translation)",
|
|
||||||
condition)
|
|
||||||
|
|
||||||
cmake_condition = ""
|
cmake_condition = ""
|
||||||
for part in condition.split():
|
for part in condition.split():
|
||||||
|
@ -74,10 +74,7 @@ def parse_command_line() -> argparse.Namespace:
|
|||||||
help="Run pro2cmake with --is-example flag.",
|
help="Run pro2cmake with --is-example flag.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--count",
|
"--count", dest="count", help="How many projects should be converted.", type=int
|
||||||
dest="count",
|
|
||||||
help="How many projects should be converted.",
|
|
||||||
type=int,
|
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--offset",
|
"--offset",
|
||||||
|
Loading…
Reference in New Issue
Block a user