diff options
author | Brad King <brad.king@kitware.com> | 2021-02-24 14:46:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-02-24 14:46:52 (GMT) |
commit | 414cfc6ecb92be706047c4e5309f65f3181bc3be (patch) | |
tree | 93493d70ae1413065c2257e6db081b3843c9a4f8 /Tests/RunCMake/CMakePresets | |
parent | 1c7b31e59e023b0f873b4f1830a219422493abbc (diff) | |
parent | 6fa36470239a40ef81752ddea923d8618ad6eb7c (diff) | |
download | CMake-414cfc6ecb92be706047c4e5309f65f3181bc3be.zip CMake-414cfc6ecb92be706047c4e5309f65f3181bc3be.tar.gz CMake-414cfc6ecb92be706047c4e5309f65f3181bc3be.tar.bz2 |
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
Diffstat (limited to 'Tests/RunCMake/CMakePresets')
7 files changed, 20 insertions, 3 deletions
diff --git a/Tests/RunCMake/CMakePresets/CMakePresets.json.in b/Tests/RunCMake/CMakePresets/CMakePresets.json.in index e65c1a9..c6f943c 100644 --- a/Tests/RunCMake/CMakePresets/CMakePresets.json.in +++ b/Tests/RunCMake/CMakePresets/CMakePresets.json.in @@ -128,7 +128,13 @@ { "name": "Good Spaces", "generator": "@RunCMake_GENERATOR@", - "binaryDir": "${sourceDir}/build" + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "GOOD_SPACES": { + "type": "STRING", + "value": "1" + } + } }, { "name": "GoodWindowsBackslash", diff --git a/Tests/RunCMake/CMakePresets/GoodSpaces-stdout.txt b/Tests/RunCMake/CMakePresets/GoodSpaces-stdout.txt new file mode 100644 index 0000000..d106c45 --- /dev/null +++ b/Tests/RunCMake/CMakePresets/GoodSpaces-stdout.txt @@ -0,0 +1,3 @@ +Preset CMake variables: + + GOOD_SPACES:STRING="1" diff --git a/Tests/RunCMake/CMakePresets/GoodSpacesEq-stdout.txt b/Tests/RunCMake/CMakePresets/GoodSpacesEq-stdout.txt new file mode 100644 index 0000000..d106c45 --- /dev/null +++ b/Tests/RunCMake/CMakePresets/GoodSpacesEq-stdout.txt @@ -0,0 +1,3 @@ +Preset CMake variables: + + GOOD_SPACES:STRING="1" diff --git a/Tests/RunCMake/CMakePresets/GoodSpacesEq.cmake b/Tests/RunCMake/CMakePresets/GoodSpacesEq.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CMakePresets/GoodSpacesEq.cmake diff --git a/Tests/RunCMake/CMakePresets/NoPresetArgumentEq-result.txt b/Tests/RunCMake/CMakePresets/NoPresetArgumentEq-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMakePresets/NoPresetArgumentEq-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMakePresets/NoPresetArgumentEq-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetArgumentEq-stderr.txt new file mode 100644 index 0000000..a53682d --- /dev/null +++ b/Tests/RunCMake/CMakePresets/NoPresetArgumentEq-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error: No preset specified for --preset +CMake Error: Run 'cmake --help' for all supported options.$ diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake index 1864ecd..dfc56ee 100644 --- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake @@ -144,7 +144,8 @@ run_cmake_presets(GoodBinaryUp) set(CMakePresets_SOURCE_ARG "../GoodBinaryRelative") run_cmake_presets(GoodBinaryRelative) unset(CMakePresets_SOURCE_ARG) -run_cmake_presets(GoodSpaces "--preset=Good Spaces") +run_cmake_presets(GoodSpaces "--preset" "Good Spaces") +run_cmake_presets(GoodSpacesEq "--preset=Good Spaces") if(WIN32) run_cmake_presets(GoodWindowsBackslash) endif() @@ -207,7 +208,8 @@ endif() # Test bad command line arguments run_cmake_presets(NoSuchPreset) -run_cmake_presets(NoPresetArgument --preset=) +run_cmake_presets(NoPresetArgument --preset) +run_cmake_presets(NoPresetArgumentEq --preset= -DA=B) run_cmake_presets(UseHiddenPreset) # Test CMakeUserPresets.json |