diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-14 19:44:42 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-17 20:52:32 (GMT) |
commit | 3061dc6ac967e859424f81fb70bbc70a74246055 (patch) | |
tree | caab349fea2aa73f929879cd3eb060ba6d60044e /Tests/RunCMake/add_custom_target | |
parent | e893ab94baa29b4a21d3edd86174cd19d8cd5a1e (diff) | |
download | CMake-3061dc6ac967e859424f81fb70bbc70a74246055.zip CMake-3061dc6ac967e859424f81fb70bbc70a74246055.tar.gz CMake-3061dc6ac967e859424f81fb70bbc70a74246055.tar.bz2 |
add_custom_command: Add tests for rejecting literal quotes in commands
Diffstat (limited to 'Tests/RunCMake/add_custom_target')
4 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_custom_target/LiteralQuotes-result.txt b/Tests/RunCMake/add_custom_target/LiteralQuotes-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_custom_target/LiteralQuotes-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_custom_target/LiteralQuotes-stderr.txt b/Tests/RunCMake/add_custom_target/LiteralQuotes-stderr.txt new file mode 100644 index 0000000..bc5187a --- /dev/null +++ b/Tests/RunCMake/add_custom_target/LiteralQuotes-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at LiteralQuotes.cmake:1 \(add_custom_target\): + COMMAND may not contain literal quotes: + + "b" + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_target/LiteralQuotes.cmake b/Tests/RunCMake/add_custom_target/LiteralQuotes.cmake new file mode 100644 index 0000000..9870608 --- /dev/null +++ b/Tests/RunCMake/add_custom_target/LiteralQuotes.cmake @@ -0,0 +1 @@ +add_custom_target(a COMMAND "\"b\"") diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake index d80ca19..49c7d3e 100644 --- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake @@ -5,6 +5,7 @@ run_cmake(GeneratedProperty) run_cmake(NoArguments) run_cmake(BadTargetName) run_cmake(ByproductsNoCommand) +run_cmake(LiteralQuotes) run_cmake(UsesTerminalNoCommand) function(run_TargetOrder) |