summaryrefslogtreecommitdiffstats
path: root/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/InterfaceLibrary/headerdir/CMakeLists.txt')
-rw-r--r--Tests/InterfaceLibrary/headerdir/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
index 98f521e..826a9ed 100644
--- a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
@@ -3,6 +3,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
add_library(headeriface INTERFACE)
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h"
- "#define IFACE_HEADER_BUILDDIR\n"
-)
+add_custom_target(headeriface_gen
+ COMMENT "Generating iface_header_builddir.h"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/iface_header_builddir.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h
+ VERBATIM
+ )
+add_dependencies(headeriface headeriface_gen)