summaryrefslogtreecommitdiffstats
path: root/Tests/BuildDepends/Project/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/BuildDepends/Project/CMakeLists.txt')
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index f8a3d15..b4c6a07 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -123,3 +123,19 @@ add_custom_target(link_depends_no_shared_check ALL
-P ${CMAKE_CURRENT_SOURCE_DIR}/link_depends_no_shared_check.cmake
)
add_dependencies(link_depends_no_shared_check link_depends_no_shared_exe)
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dir/header.txt
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_BINARY_DIR}/dir/header.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h
+ )
+
+set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/dir/header.h
+ PROPERTIES GENERATED 1)
+
+add_custom_target(header_tgt DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+add_executable(ninjadep ninjadep.cpp)
+add_dependencies(ninjadep header_tgt)