diff options
author | Brad King <brad.king@kitware.com> | 2022-08-01 17:56:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-01 18:13:03 (GMT) |
commit | b8e551ed320569b3ca0fd68477c5fa951baa5095 (patch) | |
tree | 0c0d379368662ce7abb39167a44251ada9c965b2 /Tests/RunCMake/try_run | |
parent | 514804c8bcfd26a675dcaceaa719a632a21894b2 (diff) | |
download | CMake-b8e551ed320569b3ca0fd68477c5fa951baa5095.zip CMake-b8e551ed320569b3ca0fd68477c5fa951baa5095.tar.gz CMake-b8e551ed320569b3ca0fd68477c5fa951baa5095.tar.bz2 |
Tests: Add RunCMake.try_run cases for missing keyword arguments
Diffstat (limited to 'Tests/RunCMake/try_run')
23 files changed, 58 insertions, 13 deletions
diff --git a/Tests/RunCMake/try_run/BadStdErrVariable-stderr.txt b/Tests/RunCMake/try_run/BadStdErrVariable-stderr.txt deleted file mode 100644 index 5d7e5e9..0000000 --- a/Tests/RunCMake/try_run/BadStdErrVariable-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -CMake Error: RUN_OUTPUT_STDERR_VARIABLE specified but there is no variable -CMake Error at BadStdErrVariable.cmake:1 \(try_run\): - try_run unknown error. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_run/BadStdOutVariable-stderr.txt b/Tests/RunCMake/try_run/BadStdOutVariable-stderr.txt deleted file mode 100644 index df60658..0000000 --- a/Tests/RunCMake/try_run/BadStdOutVariable-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -CMake Error: RUN_OUTPUT_STDOUT_VARIABLE specified but there is no variable -CMake Error at BadStdOutVariable.cmake:1 \(try_run\): - try_run unknown error. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_run/BadStdOutVariable-result.txt b/Tests/RunCMake/try_run/NoCompileOutputVariable-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/try_run/BadStdOutVariable-result.txt +++ b/Tests/RunCMake/try_run/NoCompileOutputVariable-result.txt diff --git a/Tests/RunCMake/try_run/NoCompileOutputVariable-stderr.txt b/Tests/RunCMake/try_run/NoCompileOutputVariable-stderr.txt new file mode 100644 index 0000000..6feaf4f --- /dev/null +++ b/Tests/RunCMake/try_run/NoCompileOutputVariable-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error: COMPILE_OUTPUT_VARIABLE specified but there is no variable +CMake Error at NoCompileOutputVariable.cmake:[0-9]+ \(try_run\): + try_run unknown error. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/try_run/NoCompileOutputVariable.cmake b/Tests/RunCMake/try_run/NoCompileOutputVariable.cmake new file mode 100644 index 0000000..85b91f4 --- /dev/null +++ b/Tests/RunCMake/try_run/NoCompileOutputVariable.cmake @@ -0,0 +1,4 @@ +try_run(RUN_RESULT COMPILE_RESULT + ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_SOURCE_DIR}/src.c + COMPILE_OUTPUT_VARIABLE + ) diff --git a/Tests/RunCMake/try_run/BadStdErrVariable-result.txt b/Tests/RunCMake/try_run/NoOutputCompileVariable-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/try_run/BadStdErrVariable-result.txt +++ b/Tests/RunCMake/try_run/NoOutputCompileVariable-result.txt diff --git a/Tests/RunCMake/try_run/NoOutputVariable-result.txt b/Tests/RunCMake/try_run/NoOutputVariable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_run/NoOutputVariable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_run/NoOutputVariable-stderr.txt b/Tests/RunCMake/try_run/NoOutputVariable-stderr.txt new file mode 100644 index 0000000..33e7df1 --- /dev/null +++ b/Tests/RunCMake/try_run/NoOutputVariable-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error: OUTPUT_VARIABLE specified but there is no variable +CMake Error at NoOutputVariable.cmake:[0-9]+ \(try_run\): + try_run unknown error. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/try_run/NoOutputVariable.cmake b/Tests/RunCMake/try_run/NoOutputVariable.cmake new file mode 100644 index 0000000..1901b30 --- /dev/null +++ b/Tests/RunCMake/try_run/NoOutputVariable.cmake @@ -0,0 +1,4 @@ +try_run(RUN_RESULT COMPILE_RESULT + ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_SOURCE_DIR}/src.c + OUTPUT_VARIABLE + ) diff --git a/Tests/RunCMake/try_run/NoRunOutputVariable-result.txt b/Tests/RunCMake/try_run/NoRunOutputVariable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunOutputVariable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_run/NoRunOutputVariable-stderr.txt b/Tests/RunCMake/try_run/NoRunOutputVariable-stderr.txt new file mode 100644 index 0000000..5ec697b --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunOutputVariable-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error: RUN_OUTPUT_VARIABLE specified but there is no variable +CMake Error at NoRunOutputVariable.cmake:[0-9]+ \(try_run\): + try_run unknown error. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/try_run/NoRunOutputVariable.cmake b/Tests/RunCMake/try_run/NoRunOutputVariable.cmake new file mode 100644 index 0000000..25310d8 --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunOutputVariable.cmake @@ -0,0 +1,4 @@ +try_run(RUN_RESULT COMPILE_RESULT + ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_SOURCE_DIR}/src.c + RUN_OUTPUT_VARIABLE + ) diff --git a/Tests/RunCMake/try_run/NoRunStdErrVariable-result.txt b/Tests/RunCMake/try_run/NoRunStdErrVariable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunStdErrVariable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_run/NoRunStdErrVariable-stderr.txt b/Tests/RunCMake/try_run/NoRunStdErrVariable-stderr.txt new file mode 100644 index 0000000..8dee056 --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunStdErrVariable-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error: RUN_OUTPUT_STDERR_VARIABLE specified but there is no variable +CMake Error at NoRunStdErrVariable.cmake:1 \(try_run\): + try_run unknown error. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/try_run/BadStdErrVariable.cmake b/Tests/RunCMake/try_run/NoRunStdErrVariable.cmake index 88c2a72..88c2a72 100644 --- a/Tests/RunCMake/try_run/BadStdErrVariable.cmake +++ b/Tests/RunCMake/try_run/NoRunStdErrVariable.cmake diff --git a/Tests/RunCMake/try_run/NoRunStdOutVariable-result.txt b/Tests/RunCMake/try_run/NoRunStdOutVariable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunStdOutVariable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_run/NoRunStdOutVariable-stderr.txt b/Tests/RunCMake/try_run/NoRunStdOutVariable-stderr.txt new file mode 100644 index 0000000..5ea6d23 --- /dev/null +++ b/Tests/RunCMake/try_run/NoRunStdOutVariable-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error: RUN_OUTPUT_STDOUT_VARIABLE specified but there is no variable +CMake Error at NoRunStdOutVariable.cmake:1 \(try_run\): + try_run unknown error. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/try_run/BadStdOutVariable.cmake b/Tests/RunCMake/try_run/NoRunStdOutVariable.cmake index 691e881..691e881 100644 --- a/Tests/RunCMake/try_run/BadStdOutVariable.cmake +++ b/Tests/RunCMake/try_run/NoRunStdOutVariable.cmake diff --git a/Tests/RunCMake/try_run/NoWorkingDirectory-result.txt b/Tests/RunCMake/try_run/NoWorkingDirectory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_run/NoWorkingDirectory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_run/NoWorkingDirectory-stderr.txt b/Tests/RunCMake/try_run/NoWorkingDirectory-stderr.txt new file mode 100644 index 0000000..10ad85c --- /dev/null +++ b/Tests/RunCMake/try_run/NoWorkingDirectory-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error: WORKING_DIRECTORY specified but there is no variable +CMake Error at NoWorkingDirectory.cmake:[0-9]+ \(try_run\): + try_run unknown error. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/try_run/NoWorkingDirectory.cmake b/Tests/RunCMake/try_run/NoWorkingDirectory.cmake new file mode 100644 index 0000000..a115e36 --- /dev/null +++ b/Tests/RunCMake/try_run/NoWorkingDirectory.cmake @@ -0,0 +1,4 @@ +try_run(RUN_RESULT COMPILE_RESULT + ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_SOURCE_DIR}/src.c + WORKING_DIRECTORY + ) diff --git a/Tests/RunCMake/try_run/RunCMakeTest.cmake b/Tests/RunCMake/try_run/RunCMakeTest.cmake index 76c85dd..698357b 100644 --- a/Tests/RunCMake/try_run/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_run/RunCMakeTest.cmake @@ -13,5 +13,9 @@ endif() run_cmake(WorkingDirArg) -run_cmake(BadStdOutVariable) -run_cmake(BadStdErrVariable) +run_cmake(NoOutputVariable) +run_cmake(NoCompileOutputVariable) +run_cmake(NoRunOutputVariable) +run_cmake(NoRunStdOutVariable) +run_cmake(NoRunStdErrVariable) +run_cmake(NoWorkingDirectory) diff --git a/Tests/RunCMake/try_run/WorkingDirArg.cmake b/Tests/RunCMake/try_run/WorkingDirArg.cmake index b583823..62f78e8 100644 --- a/Tests/RunCMake/try_run/WorkingDirArg.cmake +++ b/Tests/RunCMake/try_run/WorkingDirArg.cmake @@ -1,6 +1,6 @@ try_run(RUN_RESULT COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_SOURCE_DIR}/src.c - RUN_OUTPUT_VARIABLE OUTPUT_VARIABLE + RUN_OUTPUT_VARIABLE RUN_OUTPUT WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp/workdir ) |