Commit Graph

41 Commits

Author SHA1 Message Date
Daniel Mensinger 0e777e7c90
cmake: CMakeTraceParser improvements
- handle cached CMake variables differently
 - associate variables with source files
 - better performance (str to Path and generator expressions)
2021-05-29 13:20:25 +02:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Antonin Décimo 39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
Dylan Baker f6672c7a19 use real pathlib module
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
2020-11-20 15:08:40 -08:00
Daniel Mensinger fc57089bc5 cmake: Disable the new (CMake 3.16) PCH support
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.
2020-10-24 19:31:15 +02:00
Daniel Mensinger 1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00
Daniel Mensinger 77b5c82d07 cmake: switch to pathlib (fixes #7322) 2020-10-04 10:45:48 +02:00
Daniel Mensinger c2d55afcb5
typing: fully annotate cmake.traceparser 2020-09-28 13:53:59 +02:00
Daniel Mensinger 02ea08ba66 cmake: make the traceparser permissive by default (fixes #7501) 2020-08-07 23:53:21 +03:00
Daniel Mensinger 1c1ec9ff11
cmake: resolve IMPORTED executables in custom commands (fixes #7509) 2020-08-03 17:48:12 +02:00
Michael Hirsch 477cacf155 cmake_traceparser: ignore parse error 2020-06-09 10:08:07 -07:00
Daniel Mensinger a252a17e6e cmake: always split property lists (fixes #7228) 2020-06-02 20:47:22 +03:00
georgev93 30b89ea573 Adding a conditional case in _guess_files to confirm that the complete path is put together in even if a portion of the path is a location that exists.
For instance if C:/Program Files (x86)/folder is passed to _guess_files, it would resolve to ['C:/Program Files', '(x86)/folder'] since C:/Program Files is an actual file location that can exist.
2020-04-28 19:54:34 +02:00
georgev93 8e397491b4 Adjust regex to handle cases such as C:/Program Files/folder 2020-04-24 10:47:52 +02:00
Daniel Mensinger cf4b9e6502 cmake: Do not compile explicit header files 2020-04-17 18:28:40 +03:00
Daniel Mensinger 4199cb32a5
cmake: Fix custom command CMake list issue 2020-04-12 15:11:37 +02:00
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.
2020-02-20 11:16:37 +01:00
Daniel Mensinger 31eb41ec2f
cmake: traceparser better handle lists 2020-02-19 11:52:22 +01:00
Daniel Mensinger 796b4c120a cmake: Add support for the new JSON trace format 2020-02-12 20:58:37 +01:00
Daniel Mensinger 48cb1a7004
cmake: Fix spaces in compile flags (fixes #6566) 2020-02-04 11:37:55 +01:00
Daniel Mensinger acc6dbfab7
cmake: Add support for --trace-redirect 2020-01-26 18:23:41 +01:00
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.
2020-01-26 18:23:34 +01:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
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.
2019-12-29 19:02:24 +02:00
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.
2019-11-27 21:12:55 +01:00
Xavier Claessens 6844ad374e
cmake: Add support for add_dependencies()
Closes: #5983
2019-11-27 21:12:50 +01:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Daniel Mensinger 66e1e1747e
cmake: Do not add imported targets 2019-10-20 12:04:15 +02:00
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.
2019-10-01 13:30:15 -04:00
Xavier Claessens 90a12ed3f0 cmake: Fix 'properies' typo 2019-10-01 13:30:15 -04:00
Xavier Claessens a4b0d216b5 cmake: COMMAND could have ';' separated arguments 2019-10-01 13:30:15 -04:00
Daniel Mensinger 534e94ffc3 cmake: Support ALIAS libraries 2019-09-26 20:33:50 +03:00
Daniel Mensinger bee74eea16
cmake: Parse a subset of generator expressions 2019-07-31 17:50:02 +02:00
Daniel Mensinger 50bbeaf859
cmake: trace: add support for some target_* functions 2019-07-25 17:41:14 +02:00
Daniel Mensinger 1a4fae28ad
cmake: trace: support interface libraries 2019-07-25 17:41:14 +02:00
Daniel Mensinger e7948508d7
cmake: trace: set_target_properties improved property detection 2019-07-25 17:41:14 +02:00
Daniel Mensinger 8320217210
cmake: Also detect Windows paths 2019-06-28 20:49:25 +02:00
Daniel Mensinger 71a5ff718a
cmake: Skip ARGS key in COMMAND 2019-06-28 13:37:02 +02:00
Daniel Mensinger b07d3804fc
cmake: added suport for add_custom_command in the trace parser 2019-06-28 13:22:37 +02:00
Daniel Mensinger c78c9ee65e
cmake: Added permissive support to the trace parser 2019-06-28 13:22:37 +02:00
Daniel Mensinger b1cf0fd380
cmake: Move parsing the CMake trace into the CMake module 2019-06-12 13:58:20 +02:00