summaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/executor.py
Commit message (Collapse)AuthorAgeFilesLines
* split program related classes and functions out of dependenciesDylan Baker2021-03-191-5/+4
| | | | | | Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-4/+4
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* move CMAKE_PREFIX_PATH env var handling to environmentDylan Baker2021-01-111-18/+0
| | | | | | | | | | | | | | 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 a single coredata dictionary for optionsDylan Baker2021-01-041-1/+1
| | | | | | | 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).
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-2/+2
| | | | | | | | 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.
* use real pathlib moduleDylan Baker2020-11-201-1/+1
| | | | | 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
* cmake: Add cross compilation supportDaniel Mensinger2020-10-131-175/+10
|
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-041-1/+1
|
* cmake: switch to pathlib (fixes #7322)Daniel Mensinger2020-10-041-20/+20
|
* typing: fully annotate cmake.executorDaniel Mensinger2020-09-281-31/+35
|
* cmake: Fix detection of AppleClangDylan Baker2020-08-221-6/+19
| | | | | | 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.
* cmake: Use a mapping when writing compiler IDNirbheek Chauhan2020-08-121-1/+26
| | | | | | | | | | | | | | | 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.
* cmake: Fix hard-coded values in fake CMakeLists for MSVCNirbheek Chauhan2020-08-121-16/+28
| | | | | | | 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.
* cmake: Do not split CMAKE_PREFIX_PATH with ':' on WindowsNirbheek Chauhan2020-08-051-1/+6
| | | | | 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: Fix handling of path seperators (fixes #7294)Daniel Mensinger2020-06-131-1/+1
|
* dependencies: Don't allow using the default binary for host on cross compilesDylan Baker2020-06-121-1/+1
| | | | | | | | 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
* cmake: Use shared find_external_program instead of open codingDylan Baker2020-06-121-22/+5
|
* cmake: Subprojects support CMAKE_PREFIX_PATH (fixes #7249)Daniel Mensinger2020-06-121-0/+22
|
* More robust cmake version detectionReza Housseini2020-05-081-1/+1
|
* Issue: 7009: CMake/Centos7 Unable to find CMake even though it is installedAlexandre Lavigne2020-04-221-1/+1
| | | | | | | | | | | | | On some systems the binary 'cmake' for version 3 is named 'cmake3', therefor printing its version number prints: 'cmake3 version X.Y.Z' instead of 'cmake version X.Y.Z' This '3' digit in the middle breaks the regular expression extracting the version number. The following fix permit both way to work and the regexp to match the proper version number. Signed-off-by: Alexandre Lavigne <alexandre.lavigne@scality.com>
* Fix legacy env var support with crossJohn Ericson2020-03-231-1/+1
| | | | Fix #3969
* cmake: Fix crash when no C++ compiler is not installed (fixes #6559)Daniel Mensinger2020-02-151-46/+50
|
* cmake: Refactor CMakeExecutor and CMakeTraceParserDaniel Mensinger2020-01-261-11/+84
| | | | | | This moves most of the execution code from the CMakeInterpreter into CMakeExecutor. Also, CMakeTraceParser is now responsible for determining the trace cmd arguments.
* types: import typing as T (fixes #6333)Daniel Mensinger2020-01-081-9/+9
|
* cmake: subprocess external .decode(errors='ignore') to avoid tracebackMichael Hirsch, Ph.D2019-12-101-9/+14
| | | | | mesonlib.Popen_safe() doesn't work with the case where undecodeable binary data comes back from CMake or compiler, so we use subprocess.run()
* cmake: add fortran cache contentMichael Hirsch, Ph.D2019-12-091-15/+37
|
* correct logic for too old cmakeMichael Hirsch, Ph.D2019-08-231-1/+1
|
* avoid cmake syntax error due to "\" path separators on windowsNorbert Nemec2019-08-171-0/+6
|
* cmake: Fix dependencies with try_compile (closes #5605)Daniel Mensinger2019-07-111-11/+52
|
* cmake: Moved finding and running CMake out of dependencyDaniel Mensinger2019-06-121-0/+215