From e73e8d680ad34bee7b439c1772fa53450cfc5039 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sat, 19 Sep 2020 08:47:57 +0200 Subject: [PATCH] Fail Qt5 detection immediately when the c++ compiler is missing --- waflib/Tools/qt5.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/waflib/Tools/qt5.py b/waflib/Tools/qt5.py index 3a23abaa..cff20281 100644 --- a/waflib/Tools/qt5.py +++ b/waflib/Tools/qt5.py @@ -482,6 +482,9 @@ def configure(self): The detection uses the program ``pkg-config`` through :py:func:`waflib.Tools.config_c.check_cfg` """ + if 'COMPILER_CXX' not in self.env: + self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?') + self.find_qt5_binaries() self.set_qt5_libs_dir() self.set_qt5_libs_to_check() @@ -494,9 +497,6 @@ def configure(self): if not has_xml: Logs.error('No xml.sax support was found, rcc dependencies will be incomplete!') - if 'COMPILER_CXX' not in self.env: - self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?') - # Qt5 may be compiled with '-reduce-relocations' which requires dependent programs to have -fPIE or -fPIC? frag = '#include \nint main(int argc, char **argv) {QMap m;return m.keys().size();}\n' uses = 'QT5CORE' @@ -653,7 +653,7 @@ def set_qt5_libs_dir(self): except Errors.WafError: qtdir = self.cmd_and_log(env.QMAKE + ['-query', 'QT_INSTALL_PREFIX']).strip() qtlibs = os.path.join(qtdir, 'lib') - self.msg('Found the Qt5 libraries in', qtlibs) + self.msg('Found the Qt5 library path', qtlibs) env.QTLIBS = qtlibs @conf