summaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/interpreter.py
Commit message (Collapse)AuthorAgeFilesLines
* split program related classes and functions out of dependenciesDylan Baker2021-03-191-1/+1
| | | | | | 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-33/+33
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* split mesonlib into a packageDylan Baker2021-01-231-1/+1
| | | | | | | | | | | | | | | | | | 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.
* Fix misspellsAntonin Décimo2021-01-131-1/+1
| | | | Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
* Merge pull request #8080 from dcbaker/submit/option-key-typeJussi Pakkanen2021-01-041-5/+5
|\ | | | | Use an object for option keys
| * Use a single coredata dictionary for optionsDylan Baker2021-01-041-2/+2
| | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | 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.
| * move OptionKey to mesonlibDylan Baker2021-01-041-2/+1
| | | | | | | | | | There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
| * use OptionKey for compiler_optionsDylan Baker2021-01-041-3/+4
| |
* | cmake: fix missing languages from CMake (fixes #8132)Daniel Mensinger2021-01-041-8/+29
|/
* cmake: fix -framework dependencies (fixes #8045)Daniel Mensinger2020-12-291-0/+14
|
* cmake: Revert to using self.for_machine instead of MachineChoice.BUILD ↵Daniel Mensinger2020-12-161-0/+1
| | | | (fixes #8028)
* 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: Always create missing includes in build dirDaniel Mensinger2020-10-241-4/+1
| | | | | | | | 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.
* cmake: ignore CMAKE_TOOLCHAIN_FILE and CMAKE_PROJECT_INCLUDE to avoid ↵Daniel Mensinger2020-10-161-1/+4
| | | | conflicts with the meson CMake logic
* cmake: Add cross compilation supportDaniel Mensinger2020-10-131-57/+43
|
* 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-128/+124
|
* typing: fully annotate cmake.interpreterDaniel Mensinger2020-09-281-171/+198
|
* typing: fully annotate cmake.commonDaniel Mensinger2020-09-271-2/+2
|
* cmake: fix shared_module dependency (fixes #7715)Daniel Mensinger2020-09-101-0/+4
|
* CMake module: fix cmake 3.10 compatibility in path generationSebastian Würl2020-08-301-4/+4
|
* CMake module: fix python 3.6 compatibility in path generationSebastian Würl2020-08-301-2/+2
|
* CMake module: Allow paths of generated CMake sources for include directoriesSebastian Würl2020-08-301-3/+11
|
* cmake: Detect custom command targets in compiler argsDaniel Mensinger2020-08-091-1/+8
| | | | | | 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)Daniel Mensinger2020-08-031-3/+14
|
* mdata: remove setuptools and use mesondata insteadDaniel Mensinger2020-07-161-3/+2
|
* Merge pull request #7231 from mensinda/cmOverrideJussi Pakkanen2020-07-011-8/+13
|\ | | | | cmake: Add more advanced subproject configuration options
| * cmake: Add more advanced subproject configuration optionsDaniel Mensinger2020-06-051-8/+13
| | | | | | | | | | | | | | 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.
* | Move mesonbuild/cmake/data/run_ctgt.py to ↵georgev932020-06-301-5/+3
| | | | | | | | 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.
* | cmake: fix definitions with interface libraries (fixes #7299)Daniel Mensinger2020-06-131-7/+6
|/
* cmake: always split property lists (fixes #7228)Daniel Mensinger2020-06-021-1/+1
|
* fix cmake target configuration selection.Alexander Neumann2020-05-241-3/+10
|
* cmake: Print supported stds when warningNirbheek Chauhan2020-05-151-2/+4
| | | | | | | | This was helpful while debugging CI failure on the 0.54 branch due to a difference in the structure of self.env.coredata.compiler_options: https://github.com/mesonbuild/meson/runs/674391139 https://travis-ci.org/github/mesonbuild/meson/jobs/686982807
* cmake: Fix string substitution index errorNirbheek Chauhan2020-05-141-2/+2
| | | | | | | | ``` File "mesonbuild/cmake/interpreter.py", line 293, in postprocess 'Unknown {}_std "{}" -> Ingoring. Try setting the project' IndexError: Replacement index 2 out of range for positional args tuple ```
* cmake: Ignore unknown c(pp)? stds (fixes #7104)Daniel Mensinger2020-05-121-1/+16
|
* Use pkg_resource to find resources files (data)Dylan Baker2020-04-211-2/+4
| | | | | | | | | | Doing this by hand is fraught with corner cases, and we're running into some of those problems already. setuptools pkg_resource is a well tested solution for not running into corner cases, and we already rely on setuptools to make our entry point scripts work, so we might as well make us of the other things it can solve for us. Fixes #6801
* cmake: Do not compile explicit header filesDaniel Mensinger2020-04-171-0/+2
|
* cmake: Preserve include directory order (fixes #6959)Daniel Mensinger2020-04-121-11/+11
|
* cmake: Only expand executable targets in COMMAND (fixes #6857)Daniel Mensinger2020-03-291-2/+10
|
* cmake: Fix build_by_default: false, install: true (fixes #6737)Daniel Mensinger2020-03-081-1/+1
|
* review: Initial fixupDaniel Mensinger2020-03-021-1/+1
|
* types: Annotate mparser.pyDaniel Mensinger2020-03-021-2/+2
| | | | | | This also fixes that the keys in ArgumentNode.kwargs are all of the type BaseNode now. Before this commit, it was possible that both strings and Nodes where used as keys.
* Merge pull request #6635 from mensinda/cmOTMFixJussi Pakkanen2020-02-231-21/+43
|\ | | | | cmake: Fix dependency loops in custom targets (fixes #6632)
| * cmake: Fix relative paths for add_custom_{command,target}Daniel Mensinger2020-02-201-18/+27
| | | | | | | | | | | | | | Do this by tracking CMAKE_CURRENT_{SOURCE,BINARY}_DIR variables. This is achieved by injecting CMake code with CMAKE_PROJECT_INCLUDE and overriding some builtin functions with a wrapper that adds additional trace information.
| * cmake: Fix dependency loops in custom targets (fixes #6632)Daniel Mensinger2020-02-191-5/+18
| |
* | cmake: Ignore files that violate subproject isolation (fixes #6640)Daniel Mensinger2020-02-191-1/+13
|/
* cmake: Sanitize CMake names (fixes #6554)Daniel Mensinger2020-02-041-12/+10
|
* cmake: Add support for --trace-redirectDaniel Mensinger2020-01-261-1/+1
|
* cmake: Refactor CMakeExecutor and CMakeTraceParserDaniel Mensinger2020-01-261-42/+9
| | | | | | This moves most of the execution code from the CMakeInterpreter into CMakeExecutor. Also, CMakeTraceParser is now responsible for determining the trace cmd arguments.