summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-13 22:35:00 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-13 22:35:00 (GMT)
commit526649127e5e19076d7837d15095f47c64015fb5 (patch)
tree743b7352790675cf9713db73f00ba1f1839e45dd /Tests/ComplexRelativePaths/Executable/CMakeLists.txt
parent4cbcd08594697a77aa7d619169706e62e01a07e2 (diff)
downloadCMake-526649127e5e19076d7837d15095f47c64015fb5.zip
CMake-526649127e5e19076d7837d15095f47c64015fb5.tar.gz
CMake-526649127e5e19076d7837d15095f47c64015fb5.tar.bz2
ENH: Added test for generated header included by non-generated source.
Diffstat (limited to 'Tests/ComplexRelativePaths/Executable/CMakeLists.txt')
-rw-r--r--Tests/ComplexRelativePaths/Executable/CMakeLists.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
index 8d3c11d..2011feb 100644
--- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
@@ -3,8 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
# Create exe.
#
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
-SET_SOURCE_FILES_PROPERTIES(complex COMPILE_FLAGS
- "-DFILE_HAS_EXTRA_COMPILE_FLAGS")
+
# Link to CMake lib
LINK_DIRECTORIES(${Complex_BINARY_DIR}/../../Source)
# Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to
@@ -22,6 +21,21 @@ ELSE(UNIX)
ENDIF(NOT BORLAND)
ENDIF (UNIX)
+SET_SOURCE_FILES_PROPERTIES(complex
+ COMPILE_FLAGS "-DFILE_HAS_EXTRA_COMPILE_FLAGS"
+ OBJECT_DEPENDS ${Complex_BINARY_DIR}/cmTestGeneratedHeader.h
+)
+
+ADD_CUSTOM_COMMAND(
+ TARGET complex
+ SOURCE ${Complex_SOURCE_DIR}/cmTestGeneratedHeader.h.in
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy ${Complex_SOURCE_DIR}/cmTestGeneratedHeader.h.in
+ ${Complex_BINARY_DIR}/cmTestGeneratedHeader.h
+ OUTPUTS ${Complex_BINARY_DIR}/cmTestGeneratedHeader.h
+ DEPENDS ${CMAKE_COMMAND}
+)
+
#
# Output the files required by 'complex' to a file.
#