summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_custom_target
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-16 11:20:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-12-16 11:20:39 (GMT)
commit34469a4f71c523488682661aafc8d13b054ed5b9 (patch)
treee593b7686cdf94405cfdbc0b47745304a066f4ae /Tests/RunCMake/add_custom_target
parentd8654c2a0290b30c8684a334652d8876e5ab33f6 (diff)
parent1526ae3abac7c8e8ad61ba92e6a8219aaece7f7a (diff)
downloadCMake-34469a4f71c523488682661aafc8d13b054ed5b9.zip
CMake-34469a4f71c523488682661aafc8d13b054ed5b9.tar.gz
CMake-34469a4f71c523488682661aafc8d13b054ed5b9.tar.bz2
Merge topic 'custom-command-output-genex-nmc'
1526ae3aba Tests: Add cases for Ninja Multi-Config cross-config custom commands dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands 15467f12f7 cmLocalGenerator: Adopt custom target 'force' output name generation 7b64b0cd5a cmLocalGenerator: Refactor custom command generator construction d29da8ed3e cmMakefile: Simplify custom target 'force' output name generation 2b1cc175ee Help: Clarify version adding add_custom_{command,target} OUTPUT genex support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5612
Diffstat (limited to 'Tests/RunCMake/add_custom_target')
-rw-r--r--Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt20
-rw-r--r--Tests/RunCMake/add_custom_target/BadByproduct.cmake2
-rw-r--r--Tests/RunCMake/add_custom_target/BadCommand-result.txt1
-rw-r--r--Tests/RunCMake/add_custom_target/BadCommand-stderr.txt21
-rw-r--r--Tests/RunCMake/add_custom_target/BadCommand.cmake4
-rw-r--r--Tests/RunCMake/add_custom_target/RunCMakeTest.cmake1
6 files changed, 49 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt
index 4f0f005..da9af49 100644
--- a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt
+++ b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt
@@ -44,4 +44,24 @@ CMake Error at BadByproduct.cmake:7 \(add_custom_target\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+)+(
+CMake Error at BadByproduct.cmake:8 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<OUTPUT_CONFIG:n>
+
+ 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_target\):
+ Error evaluating generator expression:
+
+ \$<COMMAND_CONFIG:p>
+
+ 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_target/BadByproduct.cmake b/Tests/RunCMake/add_custom_target/BadByproduct.cmake
index e97f9fd..c317b83 100644
--- a/Tests/RunCMake/add_custom_target/BadByproduct.cmake
+++ b/Tests/RunCMake/add_custom_target/BadByproduct.cmake
@@ -5,3 +5,5 @@ add_custom_target(e BYPRODUCTS "a>" COMMAND f)
add_custom_target(g BYPRODUCTS "$<CONFIG>/#" COMMAND h)
add_custom_target(i BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/j COMMAND k)
add_custom_target(l BYPRODUCTS "$<TARGET_PROPERTY:prop>" COMMAND m)
+add_custom_target(n BYPRODUCTS "$<OUTPUT_CONFIG:n>" COMMAND o)
+add_custom_target(p BYPRODUCTS "$<COMMAND_CONFIG:p>" COMMAND q)
diff --git a/Tests/RunCMake/add_custom_target/BadCommand-result.txt b/Tests/RunCMake/add_custom_target/BadCommand-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/BadCommand-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/add_custom_target/BadCommand-stderr.txt b/Tests/RunCMake/add_custom_target/BadCommand-stderr.txt
new file mode 100644
index 0000000..dfdf8f8
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/BadCommand-stderr.txt
@@ -0,0 +1,21 @@
+(CMake Error at BadCommand.cmake:1 \(add_custom_target\):
+ 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:1 \(add_custom_target\):
+ 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_target/BadCommand.cmake b/Tests/RunCMake/add_custom_target/BadCommand.cmake
new file mode 100644
index 0000000..dadf038
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/BadCommand.cmake
@@ -0,0 +1,4 @@
+add_custom_target(drive
+ COMMAND "$<1:$<OUTPUT_CONFIG:a>>"
+ COMMAND "$<1:$<COMMAND_CONFIG:b>>"
+ )
diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
index f5d5dd2..22a9ed4 100644
--- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
include(RunCMake)
run_cmake(BadByproduct)
+run_cmake(BadCommand)
run_cmake(BadTargetName)
run_cmake(ByproductsNoCommand)
run_cmake(CommandExpandsEmpty)