summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakePresets
Commit message (Collapse)AuthorAgeFilesLines
* presets: add support for macro expansion to includesZoran Angelov2023-04-266-0/+39
| | | | Only `$penv{}` can be expanded when processing includes.
* Tests: Always load presets schema as UTF-8Craig Scott2023-04-071-3/+3
| | | | | | | | | | | We know the encoding of the schema file, so we should specify it when we open it for reading. Previously, by not specifying it, the test was open to using an encoding based on the active locale when running the test. We may have been enforcing a "C" locale at a higher level, but we don't need to rely on that here, we can force correct behavior without that assumption. Issue: #24679
* presets: Add trace options to configure presetsArtin Alavi2023-03-3018-0/+118
| | | | | | Add JSON schema version 7 to support them. Fixes: #22543
* presets: Improve JSON parser and error messagesMartin Duffy2023-03-2964-80/+193
|
* cmake: Print configure/generate timeKyle Edwards2023-01-191-2/+2
|
* cmake: Add --workflow modeKyle Edwards2022-09-271-0/+4
| | | | Fixes: #23118
* Tests: Add test for --list-presets=allKyle Edwards2022-09-232-0/+19
|
* cmake --list-presets: List package as a valid optionKyle Edwards2022-09-153-0/+5
|
* CMakePresets.json: Fix formatting of --list-presets=allKyle Edwards2022-08-315-0/+50
| | | | | Only print an extra newline after a section if that section was actually printed.
* Tests: Fix CMakePresets test in unusual environmentsMatthew Woehlke2022-08-191-0/+1
| | | | | | Tweak test in RunCMake/CMakePresets/GoodNoSCache.cmake to use the canonical directory for comparison. This avoids an effectively spurious test failure if the overall CMake build directory is a symlink.
* presets: Add basic error forwarding from cmake preset json parserSankhesh Jhaveri2022-08-034-4/+24
| | | | | Print errors only if there are errors. Add filename for better introspection, particularly for FileNotFound errors with presets.
* cmake-presets: add ${pathListSep} macroErin Melucci2022-05-126-0/+42
| | | | Fixes: #23282
* CMake: Use FindPython instead of FindPythonInterp to build CMake itselfKyle Edwards2022-04-212-2/+2
| | | | Fixes: #23444
* Merge topic 'correct_list-presets_parsing'Brad King2022-04-122-1/+16
|\ | | | | | | | | | | | | | | 45299a8f9b cmake: --list=presets=[type] doesn't generate incorrect warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7164
| * cmake: --list=presets=[type] doesn't generate incorrect warningsRobert Maynard2022-04-112-1/+16
| | | | | | | | Fixes #23407
* | Merge topic 'ctest_truncate'Brad King2022-03-091-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | 140704d443 ctest: add option for output truncation 359e5b17d8 presets: bump version to v5 4634de335b cmCTestTestHandler: refactor CleanTestOutput method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6993
| * presets: bump version to v5Frank Winklmeier2022-03-081-1/+1
| | | | | | | | Prepare for new test preset fields.
* | CMakePresets.json: Add ${fileDir} macroKyle Edwards2022-03-077-1/+49
| | | | | | | | Fixes: #23214
* | Help: Improve wording and structure related to preset includesCraig Scott2022-03-023-0/+11
|/ | | | | | | | | | | Encourage placing preset includes near the beginning of a preset file and ensure the example shows that usage. Move the prose discussing includes to its own section to improve discoverability and break up paragraphs to make each main point harder to miss. Also clarify ${sourceDir} to remove any ambiguity with regard to its meaning in included files. Issue: #23214
* find_package: Mention package name in Config mode debug outputBrad King2022-02-101-1/+2
| | | | | Otherwise, if there are no paths considered then the output does not specify the name of the package.
* CMakePresets: Allow files included from CMakePresets.json to be anywhereKyle Edwards2022-01-193-3/+0
| | | | | | There are some valid use cases for allowing these files to be outside the project directory. Relax the restriction, and include a strong warning in the documentation.
* CMakePresets: Add include fieldKyle Edwards2022-01-0735-0/+231
| | | | Fixes: #21331
* Refactor: Generalize file graph in CMakePresetsKyle Edwards2022-01-071-1/+1
| | | | | | | | Before this refactoring, presets had a simple flag that marked them as "user" or "not user", and checking the file graph of two files was as simple as checking this flag. This only allowed for two files in the graph. Generalize the code to allow for arbitrarily many files in the graph.
* CMakePresets: Check presets with their own file versionKyle Edwards2021-07-274-0/+20
| | | | | | | | | 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
* CMakePresets.json: Fix expansion issue with empty binaryDirKyle Edwards2021-07-163-0/+18
| | | | | | | | 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
* CMakePresets.json: Make --list-presets show presets with no generatorKyle Edwards2021-07-065-13/+20
| | | | Fixes: #22389
* Tests: Fix RunCMake.CMakePresets example PATH formatBrad King2021-05-051-0/+3
| | | | | | | Since commit 94c955e508 (Tests: Test the CMakePresets.json example in the documentation, 2020-10-09, v3.19.0-rc1~8^2) we transform the documented preset example for testing by replacing the generator. Extend the transformation with a step to fix `PATH` env var syntax.
* cmake-presets: Introduce `toolchainFile` preset optionRobert Maynard2021-04-289-2/+90
| | | | | In v3 of the presets, the `--toolchain` command line argument now has a preset mapping.
* cmake-presets: Make generator and binaryDir fields optionalfriendlyanon2021-04-065-0/+29
| | | | | | | | 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
* CMakePresets.json: Add matches conditionKyle Edwards2021-03-316-0/+80
|
* CMakePresets.json: Add the ability to conditionally disable presetsKyle Edwards2021-03-2212-0/+412
|
* CMakePresets.json: Add ${hostSystemName} macroKyle Edwards2021-03-156-0/+38
|
* cmake: configure preset add support for --install-prefix mappingRobert Maynard2021-03-099-0/+64
|
* Merge topic 'preset-flag-consistency'Brad King2021-02-247-3/+20
|\ | | | | | | | | | | | | | | | | 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
| * cmake: Document '--preset <preset>' form of the argumentBrad King2021-02-237-3/+20
| | | | | | | | | | | | This form already works. Document it and add tests. Issue: #21855
* | Merge branch 'backport-3.19-preset-no-comments' into preset-no-commentsBrad King2021-02-246-6/+16
|\ \ | |/ |/|
| * CMakePresets.json: Remove undocumented support for commentsKyle Edwards2021-02-246-6/+16
| | | | | | | | Fixes: #21858
* | Tests: Update RunCMake/CMakePresets --list-presetsSam Freed2021-02-044-4/+4
| |
* | Tests: Factor out RunCMake.CMakePresets schema validationSam Freed2021-02-042-15/+20
| | | | | | | | | | Make it available to similar tests. Also fix whitespace in generated error message.
* | cmake: redesign command-line argument parsingRobert Maynard2020-11-191-1/+2
|/ | | | | | | | | | | | | | | | | | | Make handling more consistent: "-S" -> invalid "-S/path/to/source" -> valid "-S /path/to/source" -> valid "-S=/path/to/source" -> now valid "-D" -> invalid "-DStr" -> valid "-D Str" -> valid "-D=Str" -> now valid "--log-level=" -> invalid "--log-level" -> invalid "--log-level=2" -> valid "--log-level 2" -> now valid
* CMakePresets.json: Don't warn if no path argument is givenKyle Edwards2020-11-023-0/+15
| | | | | | | | | 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
* CMakePresets.json: Rework how --preset argument is handledKyle Edwards2020-10-265-6/+31
| | | | | | | | 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
* Merge topic 'cmake-presets-toolset-arch-config' into release-3.19Craig Scott2020-10-2321-23/+71
|\ | | | | | | | | | | | | 64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5387
| * CMakePresets.json: Split cmakeGeneratorConfig fieldKyle Edwards2020-10-2221-23/+71
| | | | | | | | | | | | | | | | 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
* | CMakePresets.json: Add ${sourceDirName} macroKyle Edwards2020-10-223-0/+3
|/ | | | Fixes: #21312
* Merge topic 'cmake-presets-invalid-macro' into release-3.19Kyle Edwards2020-10-2213-46/+78
|\ | | | | | | | | | | | | 638557cbfe CMakePresets.json: Properly report macro expansion errors Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5397
| * CMakePresets.json: Properly report macro expansion errorsKyle Edwards2020-10-2113-46/+78
| | | | | | | | | | | | | | | | 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
* | CMakePresets.json: Allow boolean for cache variable valueKyle Edwards2020-10-213-0/+28
|/ | | | Fixes: #21327
* Tests: Add JSON schema validation to CMakePresets.json testsKyle Edwards2020-10-203-0/+60
|
* Help: Show environment fieldKyle Edwards2020-10-191-0/+1
|