mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
add_custom_command: Add tests for rejecting literal quotes in commands
This commit is contained in:
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,7 @@
|
||||
CMake Error at AppendLiteralQuotes.cmake:2 \(add_custom_command\):
|
||||
COMMAND may not contain literal quotes:
|
||||
|
||||
"c"
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
@@ -0,0 +1,2 @@
|
||||
add_custom_command(OUTPUT a COMMAND b)
|
||||
add_custom_command(OUTPUT a COMMAND "\"c\"" APPEND)
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,7 @@
|
||||
CMake Error at LiteralQuotes.cmake:1 \(add_custom_command\):
|
||||
COMMAND may not contain literal quotes:
|
||||
|
||||
"b"
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
1
Tests/RunCMake/add_custom_command/LiteralQuotes.cmake
Normal file
1
Tests/RunCMake/add_custom_command/LiteralQuotes.cmake
Normal file
@@ -0,0 +1 @@
|
||||
add_custom_command(OUTPUT a COMMAND "\"b\"")
|
||||
@@ -1,15 +1,18 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(AppendLiteralQuotes)
|
||||
run_cmake(AppendNoOutput)
|
||||
run_cmake(AppendNotOutput)
|
||||
run_cmake(BadArgument)
|
||||
run_cmake(GeneratedProperty)
|
||||
run_cmake(LiteralQuotes)
|
||||
run_cmake(NoArguments)
|
||||
run_cmake(NoOutputOrTarget)
|
||||
run_cmake(OutputAndTarget)
|
||||
run_cmake(SourceByproducts)
|
||||
run_cmake(SourceUsesTerminal)
|
||||
run_cmake(TargetImported)
|
||||
run_cmake(TargetLiteralQuotes)
|
||||
run_cmake(TargetNotInDir)
|
||||
|
||||
if(${RunCMake_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,7 @@
|
||||
CMake Error at TargetLiteralQuotes.cmake:2 \(add_custom_command\):
|
||||
COMMAND may not contain literal quotes:
|
||||
|
||||
"b"
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
@@ -0,0 +1,2 @@
|
||||
add_library(a)
|
||||
add_custom_command(TARGET a POST_BUILD COMMAND "\"b\"")
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -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\)
|
||||
1
Tests/RunCMake/add_custom_target/LiteralQuotes.cmake
Normal file
1
Tests/RunCMake/add_custom_target/LiteralQuotes.cmake
Normal file
@@ -0,0 +1 @@
|
||||
add_custom_target(a COMMAND "\"b\"")
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user