1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Commit Graph

820 Commits

Author SHA1 Message Date
Marius Messerschmidt
bceb8e2ed2 cmMessenger: Pass title inside a metadata structure 2021-05-19 09:06:27 -04:00
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Kyle Edwards
ce6ea7c927 Refactor: Move some common code into separate file
This code is going to be needed by both cmCMakePresetsFile and
cmCMakePresetsFileReadJSON when the upcoming condition types are
created. Move it into a header file.
2021-03-19 11:30:07 -04:00
Kyle Edwards
ebbd475e54 Refactor: Move cmCMakePresetsFile::ReadJSON into a separate file
Some compilers complain about translation units that are too large.
In order to prepare for upcoming additions to cmCMakePresetsFile,
split ReadJSON into a separate file.
2021-03-19 11:30:02 -04:00
Brad King
fe17685722 cmGlobalVisualStudio10Generator: Adopt flag table name methods
Migrate them from `cmVisualStudio10ToolsetOptions`.
2021-03-05 09:34:58 -05:00
Brad King
56fc4a325f cmXCOFF: Add helper to parse and edit the XCOFF binary format 2021-02-03 12:26:58 -05:00
Brad King
cdcfe3eb99 Rename CMAKE_USE_MACH_PARSER to CMake_USE_MACH_PARSER
We use the `CMake_` prefix for options affecting CMake itself.
2021-02-03 11:35:31 -05:00
Brad King
b6071c93f5 Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSER
We use the `CMake_` prefix for options affecting CMake itself.
2021-02-03 11:35:31 -05:00
Brad King
32498d0665 cmake: Reduce default recursion depth when compiling with IntelLLVM
This compiler makes stack frames large enough (at least in Debug
builds) that CMake language recursion to depth 1000 overflows the
stack.  Reduce the limit for this compiler.
2021-01-28 09:07:00 -05:00
Ben McMorran
bb069c0857 cmFileAPI: Add "toolchains" object kind.
Fixes #19514
2021-01-12 11:21:19 -08:00
Brad King
c257c25419 add_custom_{command,target}: Add genex support to OUTPUT and BYPRODUCTS
Move rejection of `#`, `<`, and `>` characters in outputs and byproducts
to a generate-time check.  This removes the front-end check that
disallowed generator expressions.  The generators have already been
updated to handle them.

Fixes: #12877
2020-12-11 08:24:21 -05:00
Brad King
a24a4e18af Merge topic 'makefiles-compiler-deps-optims'
2c71d051fa Makefiles Generators: use compiler for dependencies generation
afd0f6785d Refactoring: Abstract Makefile line continuation format
b6068ce407 Refactoring: enhance include file filtering
3401403f69 Refactoring: Introduce place-holder for dependency target.
a97c41bf8b Refactoring: Makefiles Generators: Add support for various depends scanners

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5528
2020-11-30 13:26:53 -05:00
Brad King
9fe62a34c1 Merge topic 'enable-extensions-on-qnx'
34f6d76755 QNX: Do not disable compiler extensions for CMake itself

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5537
2020-11-30 12:36:13 -05:00
Marc Chevrier
2c71d051fa Makefiles Generators: use compiler for dependencies generation
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.

The consolidation uses the same approach as `CMake` dependencies management.

Fixes: #21321
2020-11-29 15:25:42 +01:00
Stephen Kelly
34f6d76755 QNX: Do not disable compiler extensions for CMake itself
The `set(CMAKE_CXX_EXTENSIONS FALSE)` option has the effect of passing
compile option `-std=c++NN` instead of `-std=gnu++NN`.  On some
platforms, the latter form (or the secondary effects that it has, such
as setting _XOPEN_SOURCE) is required.  This typically affects platforms
such as mingw, cygwin and QNX.  The GNU-like compiers default to
`-std=gnu++NN`, which means that users can typically build source code
on those platforms by default.

While the `set(CMAKE_CXX_EXTENSIONS FALSE)` option was set here in
commit f034b0f6 (CMake compilation: do not use compiler extensions,
2020-03-14), the other changes in that commit added `#defines` which
become required in the absense of use of `-std=gnu++NN`.  However, only
platforms regularly tested in the cmake dashboard were ported, as is
reasonable.  That made CMake fail to compile on QNX and perhaps other
platforms which for which no one is submitting regular testing to the
cmake dashboard.

Make the `set(CMAKE_CXX_EXTENSIONS FALSE)` option conditional on non-QNX
to restore the QNX build.

Issue: #21503
2020-11-25 10:17:29 -05:00
Ben Boeckel
a02c4ccabc cmScanDepFormat: add reader and writer for the format from P1689R2
This format is currently subject to change, but is not too far from the
end goal.

Some bits are currently unimplemented (see TODO comments).
2020-11-17 13:16:05 -05:00
Marc Chevrier
1c912056a1 cmake_path: remove new command from 3.19
Defer adding this command until post-3.19 development so that it
has more time to mature before being included in a release.

Issue: #21385
2020-11-03 09:55:35 -05:00
Brad King
4f6fccd861 Merge topic 'remove-server-mode'
9952ee063a server: remove deprecated 'cmake -E server' mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5370
2020-10-15 08:31:47 -04:00
Brad King
9493532f80 Merge topic 'cmake-E-cat-binary'
f7a5f28318 cmake: Fix '-E cat' command for binary files on Windows
90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management
f1fdd15863 clang-format: Fix include block order in ctest.cxx and cpack.cxx

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5364
2020-10-15 08:10:51 -04:00
Brad King
b1d9a25f35 Merge topic 'cmake-E-cat-binary' into release-3.19
f7a5f28318 cmake: Fix '-E cat' command for binary files on Windows
90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management
f1fdd15863 clang-format: Fix include block order in ctest.cxx and cpack.cxx

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5364
2020-10-15 08:10:50 -04:00
Brad King
9952ee063a server: remove deprecated 'cmake -E server' mode
The server mode has been deprecated since commit 996e1885c4 (server:
deprecate in favor of the file-api, 2019-04-19, v3.15.0-rc1~198^2).
Clients should now be using the file-api.  Remove the server mode.
2020-10-14 16:41:50 -04:00
Brad King
90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management 2020-10-14 12:08:06 -04:00
Kyle Edwards
b2c14bc774 cmake -E: Add cmake_transform_depfile internal command 2020-10-13 10:18:02 -04:00
Kyle Edwards
06128cf949 Presets: Add cmCMakePresetsFile class 2020-10-05 09:49:59 -04:00
Zack Galbreath
56e4e942d2 ctest: split launcher XML writer into separate class
This refactor will allow us to more easily add additional warnings and errors
to builds that use launchers.
2020-09-28 13:13:52 -04:00
Kyle Edwards
3f3a30e1e0 JSON: Add helpers 2020-09-09 08:29:02 -04:00
Marc Chevrier
eb583b0a66 cmake_path command: path management
Fixes: #19568, #20922
2020-09-06 10:52:25 +02:00
Marc Chevrier
212e953d35 cmCMakePath: Class for path handling 2020-09-06 10:34:17 +02:00
Robert Maynard
dc94b0249e cmStandardLevelResolver: Added to handle standard level queries
Refactored out of cmMakefile
2020-07-01 07:58:58 -04:00
Brad King
bf60ac24ae Source: Assume elf.h does not exist on Windows 2020-06-03 07:48:52 -04:00
Brad King
94c1e4fdb3 cmake_language: Rename command from cmake_command
Also rename the `INVOKE` signature to `CALL`.

Fixes: #20732
2020-05-21 13:36:52 -04:00
Tushar Maheshwari
6728f0fa85 cmPropertyDefinitionMap: simplify and shorten 2020-05-15 18:58:02 +05:30
Marc Chevrier
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> 2020-04-30 09:53:27 +02:00
Marc Chevrier
f034b0f663 CMake compilation: do not use compiler extensions
For now, compiler extensions are no longer activated on CMake sources.
However these extensions are still used for various third parties.

This MR is a partial answer to the issue #20454.
2020-03-23 10:29:58 +01:00
Wouter Klouwen
9aa4640792 cmake: add command line options to output script profiling data
For users of CMake who want to optimize their scripts if they take a
while to run, this commit adds the ability to output profiling data.

To enable this output, it adds the two command line parameters
to select the output path and format.

This commit adds the first profiling format of type ``google-trace``,
which is the output is a JSON file containing Duration events as per the
Google Trace Format specification:

https://docs.google.com/document/d/1CvAClvFfyA5R-
PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
2020-03-07 13:36:27 +00:00
Cristian Adam
54e4f2ad45 cmake_command: Add command to INVOKE other commands by name
Fixes: #18392
2020-02-25 13:14:17 -05:00
Joerg Bornemann
f8c505d4b3 Add a parser for GCC-style depfiles
Introduce the function cmReadGccDepfile that parses a GCC-style depfile
and returns its content. The implementation uses a lexer that is
modeled after the re2c implementation in Ninja.

The sample files of the autotest have been created with gcc 8.3.0.

This depfile reader is to be used by the Autogen facility to make use
of the depfiles that are generated by Qt's meta object compiler.
2020-01-28 11:16:11 -05:00
Isuru Fernando
5ff1d7bd90 Add support for WINDOWS_EXPORT_ALL_SYMBOLS when cross-compiling to Windows
Implement `__create_def` using `llvm-nm` (when given as `CMAKE_NM`).
2019-12-06 09:30:25 -05:00
Kyle Edwards
bea26f5aa0 Merge topic 'ctest-resource-groups'
016601e5e6 Merge branch 'backport-ctest-resource-groups'
c1435d9812 Help: Fix error in resource allocation example
eb9d945f14 CTest: Rename hardware -> resources for RunCMake tests
c544cb6698 CTest: Rename hardware -> resources for source code
6ce27d3a2e cmCTestMultiProcessHandler: Rename resource locking functions
a7c1e15cc4 CTest: Rename hardware -> resources for CMake variables, command options
73a40b19ff CTest: Rename "Processes" lexer to "ResourceGroups"
af9ed543b0 CTest: Rename PROCESSES test property to RESOURCE_GROUPS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3994
2019-11-07 13:10:57 -05:00
Brad King
15feb5d3f8 Merge topic 'llvm-rc-fix'
f0c00bec1d CMakeVersion.rc: Fix build with llvm-rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4003
2019-11-07 10:25:45 -05:00
Cristian Adam
f0c00bec1d CMakeVersion.rc: Fix build with llvm-rc
llvm-rc expects versioning as having four items, it fails otherwise.
2019-11-06 10:07:01 -05:00
Brad King
016601e5e6 Merge branch 'backport-ctest-resource-groups' 2019-11-05 12:59:16 -05:00
Craig Scott
c544cb6698 CTest: Rename hardware -> resources for source code 2019-11-05 12:08:35 -05:00
Brad King
73a40b19ff CTest: Rename "Processes" lexer to "ResourceGroups"
The corresponding test property `PROCESSES` has been renamed to
`RESOURCE_GROUPS`.
2019-11-05 12:08:35 -05:00
Brad King
5417737fac Merge topic 'graphviz'
553658393c Graphviz: added test suite, fixes, enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: slodki <slodki_dom@poczta.onet.pl>
Merge-request: !3766
2019-10-17 13:54:26 -04:00
Brad King
b7509dd674 Add option to configure Ninja link job pool for CMake's own binaries
Create an undocumented `CMake_JOB_POOL_LINK_BIN` option that builders
can set to avoid linking too many of our binaries at once.
2019-10-10 13:28:45 -04:00
Corentin Plouet
553658393c Graphviz: added test suite, fixes, enhancements
* Added a fairly comprehensive test suite
* Separated the graph traversal logic from the Graphviz generation
  code by introducing a new class, cmLinkItemsGraphVisitor{.h,cxx}
* Made the graph traversal logic less ad-hoc by using existing
  methods in the GlobalGenerator; this fixed a few bugs
* Added support for new target types: custom targets, object
  and unknown libraries
* Improved support for ALIAS libraries by showing the alias(es)
  in the graph
* Introduced new flags to control those new libraries (consistent
  with existing flags)
* Updated the documentation
* Removed useless setting to set graph type in dot file
* Improved the node/edge shapes (nicer, more consistent)
* Added a legend to the graph
* Some refactoring and cleanup of the Graphviz generation code
* Added test and fix for issue 19746
2019-10-08 13:45:56 +11:00
Kyle Edwards
aee0964851 CTest: Add bin-packing algorithm
This algorithm is used to determine whether or not a test can
execute with the available resources. It uses a recursive largest-
first algorithm to try to place the tests into their respective
slots.
2019-10-02 09:33:54 -04:00
Kyle Edwards
c494b2973a CTest: Add cmCTestHardwareAllocator class 2019-10-02 09:33:54 -04:00
Kyle Edwards
c8f4806943 CTest: Add parser for hardware spec file 2019-10-02 09:33:54 -04:00