summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/cmake_path
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-07-19 18:32:42 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-20 20:03:12 (GMT)
commit1b095729dad25dd24b3e2c72ca7b01e4f97f1839 (patch)
treed73c6a94352beeb011ac8d1f7a2ef64193b71caa /Tests/RunCMake/cmake_path
parent5512057c13104ca300965bc48cf18371c6b5a89a (diff)
downloadCMake-1b095729dad25dd24b3e2c72ca7b01e4f97f1839.zip
CMake-1b095729dad25dd24b3e2c72ca7b01e4f97f1839.tar.gz
CMake-1b095729dad25dd24b3e2c72ca7b01e4f97f1839.tar.bz2
Tests: Add RunCMake.cmake_path cases for BASE_DIRECTORY missing value
Diffstat (limited to 'Tests/RunCMake/cmake_path')
-rw-r--r--Tests/RunCMake/cmake_path/BASE_DIRECTORY-no-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/RunCMakeTest.cmake8
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/cmake_path/BASE_DIRECTORY-no-arg-stderr.txt b/Tests/RunCMake/cmake_path/BASE_DIRECTORY-no-arg-stderr.txt
new file mode 100644
index 0000000..ac47545
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/BASE_DIRECTORY-no-arg-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .+/cmake_path/call-cmake_path.cmake:[0-9]+ \(cmake_path\):
+ cmake_path BASE_DIRECTORY requires an argument.
diff --git a/Tests/RunCMake/cmake_path/RunCMakeTest.cmake b/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
index 991f46b..8a2dd95 100644
--- a/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
@@ -74,6 +74,14 @@ foreach (command IN ITEMS APPEND APPEND_STRING REMOVE_FILENAME REPLACE_FILENAME
endforeach()
+## BASE_DIRECTORY without argument
+set (RunCMake-stderr-file "BASE_DIRECTORY-no-arg-stderr.txt")
+
+foreach (command IN ITEMS RELATIVE_PATH ABSOLUTE_PATH)
+ run_cmake_command (${command}-OUTPUT_VARIABLE-no-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path BASE_DIRECTORY" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+
## Invalid output variable
set (RunCMake-stderr-file "invalid-output-var-stderr.txt")