summaryrefslogtreecommitdiff
path: root/Tests/TargetName
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/TargetName')
-rw-r--r--Tests/TargetName/CMakeLists.txt5
-rw-r--r--Tests/TargetName/executables/CMakeLists.txt1
-rw-r--r--Tests/TargetName/executables/hello_world.c5
-rw-r--r--Tests/TargetName/scripts/.gitattributes1
-rw-r--r--Tests/TargetName/scripts/CMakeLists.txt13
-rwxr-xr-xTests/TargetName/scripts/hello_world2
6 files changed, 27 insertions, 0 deletions
diff --git a/Tests/TargetName/CMakeLists.txt b/Tests/TargetName/CMakeLists.txt
new file mode 100644
index 000000000..9729d21ff
--- /dev/null
+++ b/Tests/TargetName/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required (VERSION 2.6)
+project(TargetName)
+
+add_subdirectory(executables)
+add_subdirectory(scripts)
diff --git a/Tests/TargetName/executables/CMakeLists.txt b/Tests/TargetName/executables/CMakeLists.txt
new file mode 100644
index 000000000..2671e3e90
--- /dev/null
+++ b/Tests/TargetName/executables/CMakeLists.txt
@@ -0,0 +1 @@
+add_executable(hello_world hello_world.c)
diff --git a/Tests/TargetName/executables/hello_world.c b/Tests/TargetName/executables/hello_world.c
new file mode 100644
index 000000000..539d867e0
--- /dev/null
+++ b/Tests/TargetName/executables/hello_world.c
@@ -0,0 +1,5 @@
+#include <stdio.h>
+main()
+{
+ printf("hello, world\n");
+}
diff --git a/Tests/TargetName/scripts/.gitattributes b/Tests/TargetName/scripts/.gitattributes
new file mode 100644
index 000000000..51b8ce901
--- /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 000000000..40d4e2fb0
--- /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 000000000..ea3a72c1c
--- /dev/null
+++ b/Tests/TargetName/scripts/hello_world
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "hello, world"