Instead of blindly searching in PATH, use
Qt5Dependency.compilers_detect() (same for qt4) to get moc/uic/rcc.
This is much more robust, and it improves the chances that the correct
ones will be found. We still manually verify for now because the
fallback in dependencies.py for searching is stll to look in PATH for
backwards-compat, and because people probably have setups like that.
Also sync the qt4 module with the qt5 module w.r.t. resource compilation
and make the compiled qrc.cpp file unique in terms of the framework
version used (4 vs 5). This is needed for the test to work properly,
which now covers both Qt4 and 5.
* Simpler picking of pkg-config vs qmake detection
* qmake-based detection now allows specifying qmake via cross-info
* bindir is now stored from qmake/pkg-config detection and can be used
to detect qt tools such as moc, uic, rcc with self.compilers_detect()
* Qt4 dependencies got some love; now they share the implementation with
Qt5 since the two are very similar; basically identical
* Don't ask about Qt3
Without this a strange exception is spewed that no one would be able to
understand. Finding each of those compilers isn't a problem unless
sources are specified that require those compilers, so only error out in
those cases.
Closes#758
Can only test this by checking the compiler id, but that's good enough.
Disabling so we can get #995 in which will help keep the VS backend in
a better state w.r.t. other PRs.
I've opened #1004 to track this in the meantime.
It causes the cpython tests to fail when using the x86_64 toolchain.
tachyon_module.c.obj : error LNK2019: unresolved external symbol __imp_PyLong_FromLong referenced in function phaserize
tachyon_module.c.obj : error LNK2019: unresolved external symbol __imp_PyArg_ParseTuple referenced in function phaserize
tachyon_module.c.obj : error LNK2019: unresolved external symbol __imp_PyModule_Create2 referenced in function PyInit_tachyon
c:\\python34/libs\python34.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
ext/tachyon.pyd : fatal error LNK1120: 3 unresolved externals
This is useful to know what MSBuild.exe and Ninja we are using and
whether the correct one has been set via PATH by vcvarsall.bat and
hasn't been overwritten by appveyor.
With MSVC 2013 and newer, using pre-compiled headers with .pdb debugging
fails with the following error message:
fatal error C1041: cannot open program database '[...]\prog.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
So we use /FS when PCH is enabled. When PCH is enabled and debugging is
disabled, this will have no effect since .pdb files will not be written.
The code generated manually with manygen.py must use the same CRT
compiler arguments as the final executable itself or we get an error
during linking:
MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
depuser.exe : fatal error LNK1120: 1 unresolved externals
The pkg-config version shipped with MinGW is too old, and the test is
sufficiently covered on Linux, so just skip it on Windows. We anyway do
not run the other pkg-config tests on Windows.
Previously we were just dumping all defines and include directories into
the target-wide list of defines and include directories. Now we have
separate per-target and per-file (actually per-language) arguments,
defines, and include directories.
There is no way to do this in the .appveyor.yml file since it seems that
the appveyor environment is forcibly written after each cmd command that
is run.
Now we test:
MSVC 2010 + Ninja (x86)
MSVC 2015 + Ninja (x86)
MSVC 2015 + Ninja (x86_64)
MSVC 2010 + MSBuild (x86)
MSVC 2015 + MSBuild (x86)
MSVC 2015 + MSBuild (x86_64)
MSVC 2010 Express only shipped with an x86 toolchain, so we can only
test x86 for that.
- Use depfile support on recent glib-compile-resources
- Don't pass dep files to header ever
- Pass depends for generated deps
- Avoid duplicate --sourcedir args
- Include correct subdir of generated deps
We already pass everything else (custom targets, build targets, etc) as
absolute paths, and this is the only sane way to handle this till we
rework the codebase to use File objects everywhere (after reworking the
File object itself).
Fixes https://github.com/mesonbuild/meson/issues/957
Without this, we error out with an exception if `javac` is found but
`java` isn't:
[...]
File "mesonbuild/interpreter.py", line 1759, in detect_compilers
comp.sanity_check(self.environment.get_scratch_dir(), self.environment)
File "mesonbuild/compilers.py", line 1279, in sanity_check
pe = subprocess.Popen(cmdlist, cwd=work_dir)
File "/usr/lib64/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'java'
Clang++ doesn't allow that, but void* will always be allowed because
lots of projects depend on that.
error: cast from pointer to smaller type 'int' loses information
Need to pass -fpermissive to force C++ compilers to only warn about our
non-conformant code that tests for a symbol being defined.
Also do a simple #ifdef check first in has_header_symbol to allow
arbitrary macros to be detected which would not have been detected
earlier. This follows what AC_CHECK_DECL does.
Closes#958
* contributing: Use should instead of thould
* interpreter: Use exist_ok parameter in subdir function
We explicitly depend on python 3.4 or newer, which means the exist_ok
parameter is available. Use it instead of a try with a pass on except.
* authors: Add my name at the end of authors file