summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0040
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-28 15:12:26 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-28 15:33:26 (GMT)
commitd257d68138a00758910bbca3dd77dcfcc04e65cc (patch)
tree9c0eff84d7fc1268f7f57f656a3f6e7b835b78d2 /Tests/RunCMake/CMP0040
parent4d53e0a75e3ccddf14f556e88302573f14aa8830 (diff)
downloadCMake-d257d68138a00758910bbca3dd77dcfcc04e65cc.zip
CMake-d257d68138a00758910bbca3dd77dcfcc04e65cc.tar.gz
CMake-d257d68138a00758910bbca3dd77dcfcc04e65cc.tar.bz2
add_custom_command: Clarify error when TARGET is out of scope (#15681)
The add_custom_command(TARGET) signature only works for targets defined in the current directory. Clarify this in the error message when the target exists but was defined elsewhere. Inspired-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'Tests/RunCMake/CMP0040')
-rw-r--r--Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0040/CMP0040-WARN-missing-target-stderr.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target-stderr.txt b/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target-stderr.txt
index 3f82d8c..4a1077c 100644
--- a/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target-stderr.txt
+++ b/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target-stderr.txt
@@ -1,4 +1,4 @@
CMake Error at CMP0040-NEW-missing-target.cmake:3 \(add_custom_command\):
- The target name "foobar" is unknown in this context.
+ No TARGET 'foobar' has been created in this directory.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0040/CMP0040-WARN-missing-target-stderr.txt b/Tests/RunCMake/CMP0040/CMP0040-WARN-missing-target-stderr.txt
index e791f0a..e3e3ff4 100644
--- a/Tests/RunCMake/CMP0040/CMP0040-WARN-missing-target-stderr.txt
+++ b/Tests/RunCMake/CMP0040/CMP0040-WARN-missing-target-stderr.txt
@@ -4,7 +4,7 @@ CMake Warning \(dev\) at CMP0040-WARN-missing-target.cmake:2 \(add_custom_comman
policy details. Use the cmake_policy command to set the policy and
suppress this warning.
+
- The target name "foobar" is unknown in this context.
+ No TARGET 'foobar' has been created in this directory.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.