Age | Commit message (Collapse) | Author | Files | Lines |
|
performed by running "pyupgrade --py36-plus" and committing the results
|
|
Currently mesonlib does some import tricks to figure out whether it
needs to use windows or posix specific functions. This is a little
hacky, but works fine. However, the way the typing stubs are implemented
for the msvcrt and fnctl modules will cause mypy to fail on the other
platform, since the functions are not implemented.
To aleviate this (and for slightly cleaner design), I've split mesonlib
into a pacakge with three modules. A universal module contains all of
the platform agnositc code, a win32 module contains window specific
code, a posix module contains the posix specific code, and a platform
module contains no-op implementations. Then the package's __init__ file
imports all of the universal functions and all of the functions from the
approriate platform module, or the no-op versions as fallbacks. This
makes mypy happy, and avoids `if`ing all over the code to switch between
the platform specific code.
|
|
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
|
|
This causes the variable to be read up front and stored, rather than be
re-read on each invocation of meson.
This does have two slight behavioral changes. First is the obvious one
that changing the variable between `meson --reconfigure` invocations has
no effect. This is the way PKG_CONFIG_PATH already works. The second
change is that CMAKE_PREFIX_PATH the env var is no longer appended to
the values set in the machine file or on the command line, and is
instead replaced by them. CMAKE_PREFIX_PATH is the only env var in meson
that works this way, every other one is replaced not appended, so while
this is a behavioral change, I also think its a bug fix.
|
|
Use an object for option keys
|
|
This patches takes the options work to it's logical conclusion: A single
flat dictionary of OptionKey: UserOptions. This allows us to simplify a
large number of cases, as we don't need to check if an option is in this
dict or that one (or any of 5 or 6, actually).
|
|
I would have prefered to do these seperatately, but they are combined in
some cases, so it was much easier to convert them together.
this eliminates the builtins_per_machine dict, as it's duplicated with
the OptionKey's machine parameter.
|
|
There's starting to be a lot of things including coredata that coredata
needs to itself include. putting it in mesonlib makes more sense
|
|
|
|
|
|
|
|
(fixes #8028)
|
|
We added the _pathlib module to work around defeciencies in python 3.5's
implementation, since we now rely on 3.6 lets drop this
|
|
https://cmake.org/cmake/help/latest/policy/CMP0054.html
|
|
Subprojects that use the CMake PCH feature will cause
compilation/linker errors. The CMake PCH support
should thus be disabled until this can be properly
translated to meson.
|
|
There really isn't any reason to not always create missing
include directories inside the build dir. Just restricting
this to generate generated sources should work in an ideal
world, however, there exists lots of suboptimal CMake code
where this assumption is not always true.
|
|
|
|
conflicts with the meson CMake logic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It's not enough to detect that the linker is ld64: gcc, icc, and vanilla
clang all use ld64 on macoOS. Instead we have to detect the class of the
compiler, and determine if it's an Apple Compiler or a vanilla one.
|
|
Meson and CMake compiler ids are different. This commit adds a mapping
from the meson list:
https://mesonbuild.com/Reference-tables.html#compiler-ids
to the CMake list:
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
The mapping is not 1-1, and not all entries are mapped, so this is
a best-effort attempt. Fallback to GNU as before to try to limp along
and hope that the build files don't rely on an accurate compiler ID.
|
|
Without this, MSVC and MSVC_VERSION won't be set by CMake during
platform detection, and the compiler will be an undefined mixture of
GNU and MSVC. In particular, find_package(opencv) will fail on Windows
when building with MSVC.
|
|
This is required to make `-include /path/to/custom/target.hpp`
work. This setup is used by wxWidgets and this PR is
required to use wxWidgets as a CMake subproject.
|
|
|
|
cmake: resolve IMPORTED executables in custom commands (fixes #7509)
|
|
This is obviously wrong, since on Windows ':' is in the drive letter.
Causes us to call cmake with `-DCMAKE_PREFIX_PATH=c;\foo\bar`.
|
|
|
|
|
|
cmake: Add more advanced subproject configuration options
|
|
mesonbuild/scripts/cmake_run_ctgt.py, as well as enclose everything in a run() function so it can be called by `meson --internal cmake_run_ctgt ...`. Also, include mesonbuild/cmake/data/ in the msi package.
|
|
|
|
|
|
Otherwise we can end up finding dependencies from the build machine for
the host machine, which is incorrect. This alters cmake, pkg-config, and
all config-tool based dependencies.
Fixes: #7276
|
|
|
|
|
|
|
|
This is done with the new cmake subprojects options object
that is similar to the already exisiting configuration data
object. It is consumed by the new `options` kwarg of the
cmake.subproject function.
|