Daniel Mensinger
113ec96626
cmake: Fix relative paths for add_custom_{command,target}
...
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.
5 years ago
Daniel Mensinger
55d3fe4f4a
cmake: Ignore files that violate subproject isolation ( fixes #6640 )
5 years ago
Daniel Mensinger
31eb41ec2f
cmake: traceparser better handle lists
5 years ago
Daniel Mensinger
4ec6918cd5
cmake: Fix dependency loops in custom targets ( fixes #6632 )
5 years ago
Daniel Mensinger
83960ea050
cmake: Fix crash when no C++ compiler is not installed ( fixes #6559 )
5 years ago
Daniel Mensinger
796b4c120a
cmake: Add support for the new JSON trace format
5 years ago
Daniel Mensinger
48cb1a7004
cmake: Fix spaces in compile flags ( fixes #6566 )
5 years ago
Daniel Mensinger
1f7e73fd5c
cmake: Sanitize CMake names ( fixes #6554 )
5 years ago
Daniel Mensinger
acc6dbfab7
cmake: Add support for --trace-redirect
5 years ago
Daniel Mensinger
3607f50d7f
cmake: Refactor CMakeExecutor and CMakeTraceParser
...
This moves most of the execution code from the CMakeInterpreter
into CMakeExecutor. Also, CMakeTraceParser is now responsible
for determining the trace cmd arguments.
5 years ago
Daniel Mensinger
bc27ebacc9
cmake: Always Add C, CXX if no language is specified ( fixes #6441 )
5 years ago
Daniel Mensinger
09b53c534f
types: import typing as T ( fixes #6333 )
5 years ago
Daniel Mensinger
4f6453bc32
cmake: Use trace for missing link flags ( fixes #6386 )
...
This is neccessary for static libraries, since the
CMake file API does not add link flags here.
5 years ago
Daniel Mensinger
77e0008a1f
cmake: Fix obeject libraries
...
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.
5 years ago
Michael Hirsch, Ph.D
5da1a6e586
cmake: subprocess external .decode(errors='ignore') to avoid traceback
...
mesonlib.Popen_safe() doesn't work with the case where undecodeable
binary data comes back from CMake or compiler, so we use subprocess.run()
5 years ago
Michael Hirsch, Ph.D
419a7a8f51
cmake: add fortran cache content
5 years ago
Daniel Mensinger
0c875e16c4
lgtm: fix Non-iterable used in for loop
...
Not sure why LGTM is complaining about this, but moving this
from a static to a local context should fix this.
5 years ago
Daniel Mensinger
36749a1625
cmake: Make output_target_map more robust ( fixes #6208 )
...
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.
5 years ago
Daniel Mensinger
82df046bc1
cmake: Reassign dependencies from header-only targets
5 years ago
Daniel Mensinger
3cdc386cde
cmake: Detect dependenciy cycles and avoid infinite recursion
5 years ago
Daniel Mensinger
b2b9c102b5
cmake: Some minor fixup
5 years ago
Xavier Claessens
f73a1dff0e
cmake: Propagate error when running command
5 years ago
Xavier Claessens
daeee32d9b
cmake: Add support for add_custom_target() with a command
...
The command could have no output, in which case we create a dummy one.
5 years ago
Xavier Claessens
6844ad374e
cmake: Add support for add_dependencies()
...
Closes : #5983
5 years ago
Daniel Mensinger
f2114fa167
cmake: add_custom_command fix empty and quoted parameters
5 years ago
Daniel Mensinger
7e839fc4a9
cmake: Fix confilcting custom targets
5 years ago
Daniel Mensinger
560c4f7f96
cmake: Uniform target name handling
5 years ago
Daniel Mensinger
9435f11b17
ci: Add CI command to include text files in the CI log
5 years ago
Daniel Mensinger
3e1435a968
cmake: Handle CMake system include dirs ( closes #6079 )
5 years ago
Daniel Mensinger
e1fd830070
cmake: Log warnings in CMakeLists.txt
...
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.
5 years ago
Wolfgang Stöggl
f037e7ef45
Fix typos found by codespell
...
- Typos were found by codespell v1.16.0
5 years ago
Daniel Mensinger
30a668d0bb
cmake: Blacklist more compiler warning flags
5 years ago
Daniel Mensinger
66e1e1747e
cmake: Do not add imported targets
5 years ago
Daniel Mensinger
902ed589a5
cmake: Add CMake file API support
...
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
5 years ago
Daniel Mensinger
4ec82040c8
cmake: Comment out unused variables
5 years ago
Daniel Mensinger
b2c89e6f87
cmake: Move CMake API classes to common
5 years ago
Daniel Mensinger
27c01dff01
cmake: Blacklist MS debug flags ( fixes #6021 )
5 years ago
Daniel Mensinger
4185a00057
Revert "cmake: postprocess libraries names with so version"
...
This reverts commit 73f0061498
.
5 years ago
Daniel Mensinger
8103af1d76
cmake: fix detection of libraries with .so version
5 years ago
Xavier Claessens
7d9e58f125
cmake: Add support for normal libraries
...
Without this, set_target_properties() on those libraries won't be
catched, for example when setting the SOVERSION.
5 years ago
Xavier Claessens
90a12ed3f0
cmake: Fix 'properies' typo
5 years ago
Xavier Claessens
a4b0d216b5
cmake: COMMAND could have ';' separated arguments
5 years ago
Xavier Claessens
73f0061498
cmake: postprocess libraries names with so version
5 years ago
Xavier Claessens
7a83668b6b
cmake: Generate declare_dependency() only for libraries
5 years ago
Daniel Mensinger
534e94ffc3
cmake: Support ALIAS libraries
5 years ago
Michael Hirsch, Ph.D
11e34ca7fc
correct logic for too old cmake
5 years ago
Norbert Nemec
1cb6177f03
avoid cmake syntax error due to "\" path separators on windows
5 years ago
Daniel Mensinger
bee74eea16
cmake: Parse a subset of generator expressions
5 years ago
Daniel Mensinger
30c301a48c
cmake: handle interface libraries
5 years ago
Daniel Mensinger
50bbeaf859
cmake: trace: add support for some target_* functions
5 years ago