aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/interpreter.py
AgeCommit message (Collapse)AuthorFilesLines
2020-08-30CMake module: fix cmake 3.10 compatibility in path generationSebastian Würl1-4/+4
2020-08-30CMake module: fix python 3.6 compatibility in path generationSebastian Würl1-2/+2
2020-08-30CMake module: Allow paths of generated CMake sources for include directoriesSebastian Würl1-3/+11
2020-08-09cmake: Detect custom command targets in compiler argsDaniel Mensinger1-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.
2020-08-03cmake: resolve IMPORTED executables in custom commands (fixes #7509)Daniel Mensinger1-3/+14
2020-07-16mdata: remove setuptools and use mesondata insteadDaniel Mensinger1-3/+2
2020-07-01Merge pull request #7231 from mensinda/cmOverrideJussi Pakkanen1-8/+13
cmake: Add more advanced subproject configuration options
2020-06-30Move mesonbuild/cmake/data/run_ctgt.py to ↵georgev931-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.
2020-06-13cmake: fix definitions with interface libraries (fixes #7299)Daniel Mensinger1-7/+6
2020-06-05cmake: Add more advanced subproject configuration optionsDaniel Mensinger1-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.
2020-06-02cmake: always split property lists (fixes #7228)Daniel Mensinger1-1/+1
2020-05-24fix cmake target configuration selection.Alexander Neumann1-3/+10
2020-05-15cmake: Print supported stds when warningNirbheek Chauhan1-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
2020-05-14cmake: Fix string substitution index errorNirbheek Chauhan1-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 ```
2020-05-12cmake: Ignore unknown c(pp)? stds (fixes #7104)Daniel Mensinger1-1/+16
2020-04-21Use pkg_resource to find resources files (data)Dylan Baker1-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
2020-04-17cmake: Do not compile explicit header filesDaniel Mensinger1-0/+2
2020-04-12cmake: Preserve include directory order (fixes #6959)Daniel Mensinger1-11/+11
2020-03-29cmake: Only expand executable targets in COMMAND (fixes #6857)Daniel Mensinger1-2/+10
2020-03-08cmake: Fix build_by_default: false, install: true (fixes #6737)Daniel Mensinger1-1/+1
2020-03-02review: Initial fixupDaniel Mensinger1-1/+1
2020-03-02types: Annotate mparser.pyDaniel Mensinger1-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.
2020-02-23Merge pull request #6635 from mensinda/cmOTMFixJussi Pakkanen1-21/+43
cmake: Fix dependency loops in custom targets (fixes #6632)
2020-02-20cmake: Fix relative paths for add_custom_{command,target}Daniel Mensinger1-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.
2020-02-19cmake: Ignore files that violate subproject isolation (fixes #6640)Daniel Mensinger1-1/+13
2020-02-19cmake: Fix dependency loops in custom targets (fixes #6632)Daniel Mensinger1-5/+18
2020-02-04cmake: Sanitize CMake names (fixes #6554)Daniel Mensinger1-12/+10
2020-01-26cmake: Add support for --trace-redirectDaniel Mensinger1-1/+1
2020-01-26cmake: Refactor CMakeExecutor and CMakeTraceParserDaniel Mensinger1-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.
2020-01-23cmake: Always Add C, CXX if no language is specified (fixes #6441)Daniel Mensinger1-0/+2
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-31/+31
2019-12-29cmake: Use trace for missing link flags (fixes #6386)Daniel Mensinger1-0/+66
This is neccessary for static libraries, since the CMake file API does not add link flags here.
2019-12-22cmake: Fix obeject librariesDaniel Mensinger1-8/+56
This fixes an issue with generated sources and object libraries, as well as an issue on windows with the `link` linker and the vs backend. The last issue is resolved by building the source files multiple times to avoid extracting object files in meson.
2019-12-05lgtm: fix Non-iterable used in for loopDaniel Mensinger1-3/+2
Not sure why LGTM is complaining about this, but moving this from a static to a local context should fix this.
2019-11-30cmake: Make output_target_map more robust (fixes #6208)Daniel Mensinger1-64/+94
This PR refactors the old output_target_map, which was a raw dict, into it's own class. This makes the access to the map more uniform and robust (at the cost of more lines of code). Additionally relative paths to the build directory are now also tracked for outputs. This is neccessary to corretcly distingluish files with the same name, that are in different directories.
2019-11-28cmake: Reassign dependencies from header-only targetsDaniel Mensinger1-0/+45
2019-11-28cmake: Detect dependenciy cycles and avoid infinite recursionDaniel Mensinger1-0/+9
2019-11-28cmake: Some minor fixupDaniel Mensinger1-12/+26
2019-11-27cmake: Add support for add_custom_target() with a commandXavier Claessens1-4/+12
The command could have no output, in which case we create a dummy one.
2019-11-27cmake: Add support for add_dependencies()Xavier Claessens1-7/+28
Closes: #5983
2019-11-20cmake: add_custom_command fix empty and quoted parametersDaniel Mensinger1-0/+2
2019-11-20cmake: Fix confilcting custom targetsDaniel Mensinger1-8/+28
2019-11-20cmake: Uniform target name handlingDaniel Mensinger1-40/+67
2019-11-19cmake: Handle CMake system include dirs (closes #6079)Daniel Mensinger1-3/+12
2019-11-12cmake: Log warnings in CMakeLists.txtDaniel Mensinger1-4/+39
Previously, warnings genereated in CMake were not logged because CMake sends them to stderr alongside the trace information. With this PR, only real trace lines are send to the trace parser and all other lines in stderr are logged as warnings.
2019-11-06Fix typos found by codespellWolfgang Stöggl1-5/+5
- Typos were found by codespell v1.16.0
2019-10-20Merge pull request #6074 from mensinda/cmFileAPIJussi Pakkanen1-7/+50
cmake: Add CMake file API support
2019-10-20cmake: Blacklist more compiler warning flagsDaniel Mensinger1-1/+2
2019-10-20cmake: Do not add imported targetsDaniel Mensinger1-1/+1
2019-10-20cmake: Add CMake file API supportDaniel Mensinger1-5/+48
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