From 2c66bdde5a79f1597ca9bb610d4d51a7a4ec61c1 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 11 Nov 2019 18:56:47 +0100 Subject: [PATCH] pro2cmake: Skip errors regarding not found generated .pri files A lot of project files include files like qtsqldrivers-config.pri which do not exist when running pro2cmake. It should be safe to hide this error messages when converting projects. Change-Id: I4205010e537f67f9b276b4cb94ec30f847c43c68 Reviewed-by: Leander Beernaert Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index d8168aa4898..f3c9873e62f 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -3403,7 +3403,10 @@ def do_include(scope: Scope, *, debug: bool = False) -> None: if not include_file: continue if not os.path.isfile(include_file): - print(f" XXXX: Failed to include {include_file}.") + generated_config_pri_pattern = re.compile(r"qt.+?-config\.pri$") + match_result = re.search(generated_config_pri_pattern, include_file) + if not match_result: + print(f" XXXX: Failed to include {include_file}.") continue include_result = parseProFile(include_file, debug=debug)