1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-22 20:34:08 +08:00

31 Commits

Author SHA1 Message Date
Sean McBride
29ffa5f48c Source: fix -Wextra-semi-stmt warnings 2021-12-01 11:17:39 -05:00
Kyle Edwards
3e42bf3e05 CMakePresets: Check presets with their own file version
06e6981 added support for optional binaryDir and generator, but
use the dependent preset's file version instead of the current
preset's file version. Check presets with their own file version
instead of their dependent's file version.

Fixes: #22428
2021-07-27 11:45:57 -04:00
Kyle Edwards
aa874dc609 CMakePresets.json: Fix expansion issue with empty binaryDir
When resolving binaryDir into a full path from a relative path, we
forgot to check if binaryDir is altogether empty, causing empty
binaryDir's to resolve to the source directory. Fix this.

Fixes: #22434
2021-07-16 10:25:40 -04:00
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
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
432de16343 Merge topic 'dev/safreed/invalidconfigurepreset'
bc663dc333 Merge branch 'master' into invalid-configure-preset
b9eb3541cf Tests: update tests to catch invalid configurePreset at read-time
83eeeff7dc Fail at read-time if configurePreset field invalid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5912
2021-03-17 09:14:55 -04:00
Kyle Edwards
bc663dc333 Merge branch 'master' into invalid-configure-preset 2021-03-16 10:16:02 -04:00
Sam Freed
83eeeff7dc Fail at read-time if configurePreset field invalid 2021-03-15 14:44:43 -07:00
Kyle Edwards
0d497e159b CMakePresets.json: Add ${hostSystemName} macro 2021-03-15 14:41:42 -04:00
Kyle Edwards
69527a1979 Refactor: Pass CMakePresets.json version to ExpandMacros() functions 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
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
Sam Freed
121d602923 presets: Inherit 'quiet' property for test presets
This was missed in the original implementation.
2021-02-15 10:52:32 -05:00
Sam Freed
7fd6bb6895 presets: Remove unintended rerunFailed option from test presets
This was accidentally included after discussion in #21391 had decided to
leave it out.  It was never included in a release.

Issue: #21391
2021-02-15 10:52:32 -05:00
Sam Freed
676ecf0d37 cmake-presets: Add build and test presets
Fixes: #21391
2021-02-01 11:59:40 -05:00
Ben Boeckel
ef935b17ab clang-tidy: fix readability-use-anyofallof warnings 2021-01-27 08:54:18 -05:00
Craig Scott
5e1858c0c2 Merge topic 'cmake-presets-toolset-arch-config' into release-3.19
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5387
2020-10-23 06:37:56 -04:00
Craig Scott
dbd1d737f9 Merge topic 'cmake-presets-toolset-arch-config'
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5387
2020-10-23 06:37:56 -04: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
25742c589c CMakePresets.json: Add ${sourceDirName} macro
Fixes: #21312
2020-10-22 11:09:28 -04:00
Kyle Edwards
609122007d Merge topic 'cmake-presets-invalid-macro' into release-3.19
638557cbfe CMakePresets.json: Properly report macro expansion errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5397
2020-10-22 11:05:09 -04:00
Kyle Edwards
920d180047 CMakePresets.json: Allow boolean for cache variable value
Fixes: #21327
2020-10-21 10:37:08 -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
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
Kyle Edwards
06128cf949 Presets: Add cmCMakePresetsFile class 2020-10-05 09:49:59 -04:00