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

19 Commits

Author SHA1 Message Date
Robert Maynard
a9b968bb98 cmake-presets: Introduce toolchainFile preset option
In v3 of the presets, the `--toolchain` command line argument now
has a preset mapping.
2021-04-28 17:22:25 -04:00
friendlyanon
06e6981336 cmake-presets: Make generator and binaryDir fields optional
In v3 of the presets, generator and buildDir can be omitted to fall
back to regular cmake behavior when these values are not explicitly
provided by the user.

Fixes: #21987
2021-04-07 01:24:44 +02:00
Kyle Edwards
5ac8b923f5 CMakePresets.json: Add matches condition 2021-03-31 10:24:24 -04:00
Kyle Edwards
8bc5c8961e CMakePresets.json: Add the ability to conditionally disable presets 2021-03-22 15:04:54 -04:00
Kyle Edwards
0d497e159b CMakePresets.json: Add ${hostSystemName} macro 2021-03-15 14:41:42 -04:00
Robert Maynard
b227a9565e cmake: configure preset add support for --install-prefix mapping 2021-03-09 13:53:16 -05:00
Brad King
414cfc6ecb Merge topic 'preset-flag-consistency'
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument
2f13fdef0a cmake: Document '--preset <preset>' form of the argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5849
2021-02-24 09:46:52 -05:00
Brad King
06e16ea008 Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments 2021-02-24 09:33:59 -05:00
Kyle Edwards
431dd59b5e CMakePresets.json: Remove undocumented support for comments
Fixes: #21858
2021-02-24 09:28:36 -05:00
Brad King
2f13fdef0a cmake: Document '--preset <preset>' form of the argument
This form already works.  Document it and add tests.

Issue: #21855
2021-02-23 09:11:32 -05:00
Sam Freed
56751c83aa Tests: Factor out RunCMake.CMakePresets schema validation
Make it available to similar tests.  Also fix whitespace
in generated error message.
2021-02-04 11:00:42 -05:00
Kyle Edwards
cb2d01c182 CMakePresets.json: Don't warn if no path argument is given
If --preset is specified with no path argument, use the current
directory as the source directory, the preset's binaryDir as the
binary directory, and don't issue the standard warning for no path
specified.

Fixes: #21386
2020-11-02 09:46:08 -05:00
Kyle Edwards
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled
If a path argument with no -S or -B leads to a cache directory,
use that directory as the binary directory. Otherwise, use the
binary directory from the preset.

Fixes: #21311
2020-10-26 22:32:45 +11:00
Kyle Edwards
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field
Make this field separate for both architecture and toolset. Allow
architecture and toolset to be either strings or objects with value
and strategy fields.

Fixes: #21317
2020-10-22 11:24:39 -04:00
Kyle Edwards
638557cbfe CMakePresets.json: Properly report macro expansion errors
Make a distinction between strings which simply use the
$vendor{<...>} macro, which is valid but makes it unusable by CMake,
and strings which actually contain invalid macro expansions.

Fixes: #21308
2020-10-21 09:20:52 -04:00
Kyle Edwards
e3bce8edf4 Tests: Add JSON schema validation to CMakePresets.json tests 2020-10-20 12:07:09 -04:00
Kyle Edwards
94c955e508 Tests: Test the CMakePresets.json example in the documentation 2020-10-09 15:35:54 -04:00
Kyle Edwards
a395cb516b CMakePresets.json: Prohibit empty variable names 2020-10-06 12:09:38 -04:00
Kyle Edwards
8617479061 CMake: Add presets functionality 2020-10-05 09:49:59 -04:00