summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CMakePresets/CMakePresets.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoS.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoSCache.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/RunCMakeTest.cmake16
-rw-r--r--Tests/RunCMake/CommandLine/NoArgs-stdout.txt1
6 files changed, 31 insertions, 7 deletions
diff --git a/Tests/RunCMake/CMakePresets/CMakePresets.json.in b/Tests/RunCMake/CMakePresets/CMakePresets.json.in
index a8f89ff..a347120 100644
--- a/Tests/RunCMake/CMakePresets/CMakePresets.json.in
+++ b/Tests/RunCMake/CMakePresets/CMakePresets.json.in
@@ -160,6 +160,16 @@
"binaryDir": "${sourceDir}/build"
},
{
+ "name": "GoodNoSCachePrep",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceParentDir}/GoodNoSCachePrep-build"
+ },
+ {
+ "name": "GoodNoSCache",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
"name": "GoodInheritanceParentBase",
"hidden": true,
"generator": "@RunCMake_GENERATOR@",
diff --git a/Tests/RunCMake/CMakePresets/GoodNoS.cmake b/Tests/RunCMake/CMakePresets/GoodNoS.cmake
index 1d3b2ff..49e7a25 100644
--- a/Tests/RunCMake/CMakePresets/GoodNoS.cmake
+++ b/Tests/RunCMake/CMakePresets/GoodNoS.cmake
@@ -1,4 +1,3 @@
include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
-get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
-test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodNoS-build")
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
diff --git a/Tests/RunCMake/CMakePresets/GoodNoSCache.cmake b/Tests/RunCMake/CMakePresets/GoodNoSCache.cmake
new file mode 100644
index 0000000..df58e72
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoSCache.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodNoSCachePrep-build")
diff --git a/Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake b/Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake
new file mode 100644
index 0000000..df58e72
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodNoSCachePrep-build")
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
index bd84510..2caa66a 100644
--- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
@@ -28,8 +28,8 @@ endfunction()
function(run_cmake_presets name)
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/${name}")
set(_source_arg "${RunCMake_TEST_SOURCE_DIR}")
- if(CMakePresets_RELATIVE_SOURCE)
- set(_source_arg "../${name}")
+ if(CMakePresets_SOURCE_ARG)
+ set(_source_arg "${CMakePresets_SOURCE_ARG}")
endif()
file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
@@ -154,9 +154,9 @@ unset(ENV{TEST_ENV_REF_PENV})
run_cmake_presets(GoodNoArgs)
file(REMOVE_RECURSE ${RunCMake_BINARY_DIR}/GoodBinaryUp-build)
run_cmake_presets(GoodBinaryUp)
-set(CMakePresets_RELATIVE_SOURCE TRUE)
+set(CMakePresets_SOURCE_ARG "../GoodBinaryRelative")
run_cmake_presets(GoodBinaryRelative)
-unset(CMakePresets_RELATIVE_SOURCE)
+unset(CMakePresets_SOURCE_ARG)
run_cmake_presets(GoodSpaces "--preset=Good Spaces")
if(WIN32)
run_cmake_presets(GoodWindowsBackslash)
@@ -170,6 +170,14 @@ run_cmake_presets(GoodGeneratorCmdLine -G ${RunCMake_GENERATOR})
run_cmake_presets(InvalidGeneratorCmdLine -G "Invalid Generator")
set(CMakePresets_NO_S_ARG TRUE)
run_cmake_presets(GoodNoS)
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/GoodNoSCachePrep-build")
+run_cmake_presets(GoodNoSCachePrep)
+set(CMakePresets_SOURCE_ARG ".")
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_presets(GoodNoSCache)
+unset(RunCMake_TEST_NO_CLEAN)
+unset(CMakePresets_SOURCE_ARG)
+unset(RunCMake_TEST_BINARY_DIR)
unset(CMakePresets_NO_S_ARG)
run_cmake_presets(GoodInheritanceParent)
run_cmake_presets(GoodInheritanceChild)
diff --git a/Tests/RunCMake/CommandLine/NoArgs-stdout.txt b/Tests/RunCMake/CommandLine/NoArgs-stdout.txt
index 50f7d9d..f1dafc8 100644
--- a/Tests/RunCMake/CommandLine/NoArgs-stdout.txt
+++ b/Tests/RunCMake/CommandLine/NoArgs-stdout.txt
@@ -3,7 +3,6 @@
cmake \[options\] <path-to-source>
cmake \[options\] <path-to-existing-build>
cmake \[options\] -S <path-to-source> -B <path-to-build>
- cmake \[options\] -S <path-to-source> --preset=<preset-name>
Specify a source directory to \(re-\)generate a build system for it in the
current working directory. Specify an existing build directory to