summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2013-11-20 08:53:06 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-21 14:24:08 (GMT)
commita02f3d2de00a16a68e8948db3c0de507e569f8a3 (patch)
tree065ce76b2c29a27325a0d36a8869856dbfb6dbe9 /Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake
parenta61025135b1c1ceea9634973b983bd3e47be8bdd (diff)
downloadCMake-a02f3d2de00a16a68e8948db3c0de507e569f8a3.zip
CMake-a02f3d2de00a16a68e8948db3c0de507e569f8a3.tar.gz
CMake-a02f3d2de00a16a68e8948db3c0de507e569f8a3.tar.bz2
Add policy CMP0040 to disallow custom commands on missing targets
Diffstat (limited to 'Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake')
-rw-r--r--Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake b/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake
new file mode 100644
index 0000000..276863d
--- /dev/null
+++ b/Tests/RunCMake/CMP0040/CMP0040-NEW-missing-target.cmake
@@ -0,0 +1,5 @@
+cmake_policy(SET CMP0040 NEW)
+
+add_custom_command(TARGET foobar PRE_BUILD
+ COMMAND "${CMAKE_COMMAND} -E hello world"
+)