diff options
author | Frederik Gladhorn <frederik.gladhorn@remarkable.com> | 2020-02-21 15:52:04 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@remarkable.com> | 2020-02-21 16:04:19 +0100 |
commit | e3c4870feba182bc4565b7481536087dbb785832 (patch) | |
tree | c6542b75595bb1f6c1547b1d8a657810c8a3fbca /util | |
parent | 1826fa978a19ab037c180314e8b585343c6da6f0 (diff) |
Do not try to find .qmake.conf past the root directory
In case of .qmake.conf not existing, this would result in an infinite loop.
Change-Id: I577aaed7a502efb7b01dc6b199dcf464358bf5a9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index f5e678acd4..b46985e582 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -286,7 +286,11 @@ def find_qmake_conf(project_file_path: str = "") -> str: if os.path.isfile(maybe_file): return maybe_file else: + last_cwd = cwd cwd = os.path.dirname(cwd) + if last_cwd == cwd: + # reached the top level directory, stop looking + break print(f"Warning: could not find .qmake.conf file") return "" |