summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_custom_command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-02 19:19:27 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-15 13:17:55 (GMT)
commit1526ae3abac7c8e8ad61ba92e6a8219aaece7f7a (patch)
treeaeb7305f9e22f0fcb6ec75c5d576d9a037202efc /Tests/RunCMake/add_custom_command
parentdcf9f4d2f71d7c608ce24b690d30d465df51dc71 (diff)
downloadCMake-1526ae3abac7c8e8ad61ba92e6a8219aaece7f7a.zip
CMake-1526ae3abac7c8e8ad61ba92e6a8219aaece7f7a.tar.gz
CMake-1526ae3abac7c8e8ad61ba92e6a8219aaece7f7a.tar.bz2
Tests: Add cases for Ninja Multi-Config cross-config custom commands
Diffstat (limited to 'Tests/RunCMake/add_custom_command')
-rw-r--r--Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt20
-rw-r--r--Tests/RunCMake/add_custom_command/BadByproduct.cmake2
-rw-r--r--Tests/RunCMake/add_custom_command/BadCommand-result.txt1
-rw-r--r--Tests/RunCMake/add_custom_command/BadCommand-stderr.txt21
-rw-r--r--Tests/RunCMake/add_custom_command/BadCommand.cmake3
-rw-r--r--Tests/RunCMake/add_custom_command/BadOutput-stderr.txt20
-rw-r--r--Tests/RunCMake/add_custom_command/BadOutput.cmake2
-rw-r--r--Tests/RunCMake/add_custom_command/RunCMakeTest.cmake1
8 files changed, 70 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt b/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt
index 6d51575..547fb1c 100644
--- a/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt
+++ b/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt
@@ -44,4 +44,24 @@ CMake Error at BadByproduct.cmake:7 \(add_custom_command\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+)+(
+CMake Error at BadByproduct.cmake:8 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<OUTPUT_CONFIG:h>
+
+ Expression did not evaluate to a known generator expression
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+
+)+(
+CMake Error at BadByproduct.cmake:9 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<COMMAND_CONFIG:i>
+
+ Expression did not evaluate to a known generator expression
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+
)+
diff --git a/Tests/RunCMake/add_custom_command/BadByproduct.cmake b/Tests/RunCMake/add_custom_command/BadByproduct.cmake
index 7c786a4..cf00f5b 100644
--- a/Tests/RunCMake/add_custom_command/BadByproduct.cmake
+++ b/Tests/RunCMake/add_custom_command/BadByproduct.cmake
@@ -5,3 +5,5 @@ add_custom_command(OUTPUT c BYPRODUCTS "a>")
add_custom_command(OUTPUT d BYPRODUCTS "$<CONFIG>/#")
add_custom_command(OUTPUT e BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/f)
add_custom_command(OUTPUT f BYPRODUCTS "$<TARGET_PROPERTY:prop>")
+add_custom_command(OUTPUT h BYPRODUCTS "$<OUTPUT_CONFIG:h>")
+add_custom_command(OUTPUT i BYPRODUCTS "$<COMMAND_CONFIG:i>")
diff --git a/Tests/RunCMake/add_custom_command/BadCommand-result.txt b/Tests/RunCMake/add_custom_command/BadCommand-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/BadCommand-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/add_custom_command/BadCommand-stderr.txt b/Tests/RunCMake/add_custom_command/BadCommand-stderr.txt
new file mode 100644
index 0000000..470afd6
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/BadCommand-stderr.txt
@@ -0,0 +1,21 @@
+(CMake Error at BadCommand.cmake:1 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<OUTPUT_CONFIG:a>
+
+ Expression did not evaluate to a known generator expression
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+
+
+)+(CMake Error at BadCommand.cmake:2 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<COMMAND_CONFIG:b>
+
+ Expression did not evaluate to a known generator expression
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+
+
+)+
diff --git a/Tests/RunCMake/add_custom_command/BadCommand.cmake b/Tests/RunCMake/add_custom_command/BadCommand.cmake
new file mode 100644
index 0000000..8c9c3f9
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/BadCommand.cmake
@@ -0,0 +1,3 @@
+add_custom_command(OUTPUT "a" COMMAND "$<1:$<OUTPUT_CONFIG:a>>")
+add_custom_command(OUTPUT "b" COMMAND "$<1:$<COMMAND_CONFIG:b>>")
+add_custom_target(drive DEPENDS "a" "b")
diff --git a/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt b/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt
index 506bec9..2e43568 100644
--- a/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt
+++ b/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt
@@ -44,4 +44,24 @@ CMake Error at BadOutput.cmake:7 \(add_custom_command\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+)+(
+CMake Error at BadOutput.cmake:8 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<OUTPUT_CONFIG:h>
+
+ Expression did not evaluate to a known generator expression
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+
+)+(
+CMake Error at BadOutput.cmake:9 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<COMMAND_CONFIG:i>
+
+ Expression did not evaluate to a known generator expression
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+
)+
diff --git a/Tests/RunCMake/add_custom_command/BadOutput.cmake b/Tests/RunCMake/add_custom_command/BadOutput.cmake
index 77acb7f..f04bdd1 100644
--- a/Tests/RunCMake/add_custom_command/BadOutput.cmake
+++ b/Tests/RunCMake/add_custom_command/BadOutput.cmake
@@ -5,3 +5,5 @@ add_custom_command(OUTPUT "a>" COMMAND c)
add_custom_command(OUTPUT "$<CONFIG>/#" COMMAND d)
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/e COMMAND f)
add_custom_command(OUTPUT "$<TARGET_PROPERTY:prop>" COMMAND g)
+add_custom_command(OUTPUT "$<OUTPUT_CONFIG:h>" COMMAND h)
+add_custom_command(OUTPUT "$<COMMAND_CONFIG:i>" COMMAND i)
diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
index aac085d..9c59b4b 100644
--- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
@@ -6,6 +6,7 @@ run_cmake(AppendNotOutput)
run_cmake(BadArgument)
run_cmake(BadByproduct)
run_cmake(BadOutput)
+run_cmake(BadCommand)
run_cmake(GeneratedProperty)
run_cmake(LiteralQuotes)
run_cmake(NoArguments)