summaryrefslogtreecommitdiffstats
path: root/Tests/TargetName/scripts
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-27 20:14:42 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-27 20:14:42 (GMT)
commit31a576abe674ba12021f75b574a4787458990cbd (patch)
tree4c94eb5f3ac7d97f254e131082a1646421070d9d /Tests/TargetName/scripts
parent0954696e3ee948afe3d42c6a6e41d70573640db1 (diff)
downloadCMake-31a576abe674ba12021f75b574a4787458990cbd.zip
CMake-31a576abe674ba12021f75b574a4787458990cbd.tar.gz
CMake-31a576abe674ba12021f75b574a4787458990cbd.tar.bz2
ENH: add a test for a target name with the same name as the output of a custom command
Diffstat (limited to 'Tests/TargetName/scripts')
-rw-r--r--Tests/TargetName/scripts/.gitattributes1
-rw-r--r--Tests/TargetName/scripts/CMakeLists.txt13
-rwxr-xr-xTests/TargetName/scripts/hello_world2
3 files changed, 16 insertions, 0 deletions
diff --git a/Tests/TargetName/scripts/.gitattributes b/Tests/TargetName/scripts/.gitattributes
new file mode 100644
index 0000000..51b8ce9
--- /dev/null
+++ b/Tests/TargetName/scripts/.gitattributes
@@ -0,0 +1 @@
+hello_world crlf=input
diff --git a/Tests/TargetName/scripts/CMakeLists.txt b/Tests/TargetName/scripts/CMakeLists.txt
new file mode 100644
index 0000000..40d4e2f
--- /dev/null
+++ b/Tests/TargetName/scripts/CMakeLists.txt
@@ -0,0 +1,13 @@
+if(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hello_world
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_SOURCE_DIR}/hello_world ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/hello_world
+ )
+ add_custom_target(
+ hello_world_copy ALL
+ DEPENDS #hello_world
+ ${CMAKE_CURRENT_BINARY_DIR}/hello_world
+ )
+endif(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
diff --git a/Tests/TargetName/scripts/hello_world b/Tests/TargetName/scripts/hello_world
new file mode 100755
index 0000000..ea3a72c
--- /dev/null
+++ b/Tests/TargetName/scripts/hello_world
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "hello, world"