In a large project, it can be hard to guess what meson "had in mind", when many different
warnings are added in different places. Let's make the message precise and specify the location.
WARNING: Consider using the built-in warning_level option instead of adding warning flags by hand.
↓
meson.build:414: WARNING: Consider using the built-in warning_level option instead of using "-Wextra".
This means that when either cflags or libs lookup fails, this will be
logged always in the log, leading to much easier to debug messages
like:
Called `/usr/local/bin/pkg-config --cflags gnutls` -> 1
pkg-config error with 'gnutls': Could not generate cargs for gnutls:
Package nettle was not found in the pkg-config search path.
Perhaps you should add the directory containing `nettle.pc'
to the PKG_CONFIG_PATH environment variable
Package 'nettle', required by 'gnutls', not found
Run-time dependency gnutls found: NO (tried pkgconfig)
Previously even when meson failed to obtain cflags or libs for a
dependency it would lead to the dependency being found, causing very
confusing errors at build time.
FreeBSD uses ${PREFIX}/libdata/pkgconfig as default pkgconf search path
for non-base libraries. This commit makes that directory the default
install_dir in the pkgconfig module on FreeBSD.
Under Windows, the colon ':' is used after the drive letter.
So, the colon should not be used as a list separator or for splitting,
otherwise it could lead to paths in CMAKE_PREFIX_PATH with a
semicolon ';' between the drive letter and the rest of the path, e.g:
-DCMAKE_PREFIX_PATH=C;/foo/bar
instead of
-DCMAKE_PREFIX_PATH=C:/foo/bar
Use os.pathsep instead of ':' to split the environmental variable
CMAKE_PREFIX_PATH
When a static library link_whole to a bunch of other static libraries,
we have to extract all their objects recursively. But that could
introduce duplicated objects. ar is dumb enough to allow this without
error, but once the resulting static library is linked into an
executable or shared library, the linker will complain about duplicated
symbols.
The file API will automatically be used when CMake >= 3.14
is detected. This new API is meant as a replacement for the
now deprecated CMake server API.
The new API (mostly) provides the same information in a
different format. Thus only a slight bit of refactoring was
necessary to implement this new backend
The lack of newlines in the print() statement for this error causes the result
to be jumbled and hard to read:
$ ./meson.py introspect
Current directory is not a meson build directory.Please specify a valid build dir or change the working directory to it.It is also possible that the build directory was generated with an oldmeson version. Please regenerate it in this case.
Add newlines so the message is more readable:
$ ./meson.py introspect
Current directory is not a meson build directory.
Please specify a valid build dir or change the working directory to it.
It is also possible that the build directory was generated with an old
meson version. Please regenerate it in this case.