Fail Qt5 detection immediately when the c++ compiler is missing

This commit is contained in:
Thomas Nagy 2020-09-19 08:47:57 +02:00
parent 7dd713f01f
commit 7348371f84
1 changed files with 4 additions and 4 deletions

View File

@ -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 <QMap>\nint main(int argc, char **argv) {QMap<int,int> 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