summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-01-09 19:56:29 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-01-09 19:56:29 (GMT)
commitc3a7680dc6ee8e6848b55fb5992a977ca76236aa (patch)
treeed400b3d4f790595a2781236e7c6a12e6dc79f78 /Tests
parenta91947039a025df00403be2cadba469346f274a8 (diff)
downloadCMake-c3a7680dc6ee8e6848b55fb5992a977ca76236aa.zip
CMake-c3a7680dc6ee8e6848b55fb5992a977ca76236aa.tar.gz
CMake-c3a7680dc6ee8e6848b55fb5992a977ca76236aa.tar.bz2
ENH: add test for generated header
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CustomCommand/GeneratedHeader/CMakeLists.txt10
-rw-r--r--Tests/CustomCommand/GeneratedHeader/generated.h.in1
-rw-r--r--Tests/CustomCommand/GeneratedHeader/main.cpp5
3 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt b/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt
new file mode 100644
index 0000000..0ab333b
--- /dev/null
+++ b/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt
@@ -0,0 +1,10 @@
+ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h
+ COMMAND
+ ${CMAKE_COMMAND} ARGS -E
+ copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/generated.h
+)
+
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR})
+ADD_LIBRARY(GeneratedHeader main.cpp)
+
diff --git a/Tests/CustomCommand/GeneratedHeader/generated.h.in b/Tests/CustomCommand/GeneratedHeader/generated.h.in
new file mode 100644
index 0000000..ae6f64c
--- /dev/null
+++ b/Tests/CustomCommand/GeneratedHeader/generated.h.in
@@ -0,0 +1 @@
+//hello
diff --git a/Tests/CustomCommand/GeneratedHeader/main.cpp b/Tests/CustomCommand/GeneratedHeader/main.cpp
new file mode 100644
index 0000000..254ecf5
--- /dev/null
+++ b/Tests/CustomCommand/GeneratedHeader/main.cpp
@@ -0,0 +1,5 @@
+#include "generated.h"
+main()
+{
+
+}