summaryrefslogtreecommitdiff
path: root/Tests/InterfaceLibrary
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/InterfaceLibrary')
-rw-r--r--Tests/InterfaceLibrary/CMakeLists.txt1
-rw-r--r--Tests/InterfaceLibrary/definetestexe.cpp6
-rw-r--r--Tests/InterfaceLibrary/headerdir/CMakeLists.txt9
-rw-r--r--Tests/InterfaceLibrary/headerdir/iface_genheader.h.in1
4 files changed, 17 insertions, 0 deletions
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index 311ca2a4e7..ec0a604050 100644
--- a/Tests/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/CMakeLists.txt
@@ -44,6 +44,7 @@ add_executable(InterfaceLibrary definetestexe.cpp)
target_link_libraries(InterfaceLibrary
iface_nodepends
headeriface
+ iface_genheader
subiface
intermediate
diff --git a/Tests/InterfaceLibrary/definetestexe.cpp b/Tests/InterfaceLibrary/definetestexe.cpp
index 9156426cdb..6c538405e3 100644
--- a/Tests/InterfaceLibrary/definetestexe.cpp
+++ b/Tests/InterfaceLibrary/definetestexe.cpp
@@ -15,6 +15,12 @@
# error Expected IFACE_HEADER_BUILDDIR
#endif
+#include "iface_genheader.h"
+
+#ifndef IFACE_GENHEADER
+# error Expected IFACE_GENHEADER
+#endif
+
extern int obj();
extern int sub();
extern int item();
diff --git a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
index 826a9ed9c0..ae030d7516 100644
--- a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
@@ -11,3 +11,12 @@ add_custom_target(headeriface_gen
VERBATIM
)
add_dependencies(headeriface headeriface_gen)
+
+add_custom_command(OUTPUT iface_genheader.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_SOURCE_DIR}/iface_genheader.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/iface_genheader.h
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/iface_genheader.h.in
+ VERBATIM)
+add_library(iface_genheader INTERFACE iface_genheader.h)
diff --git a/Tests/InterfaceLibrary/headerdir/iface_genheader.h.in b/Tests/InterfaceLibrary/headerdir/iface_genheader.h.in
new file mode 100644
index 0000000000..0a21b62688
--- /dev/null
+++ b/Tests/InterfaceLibrary/headerdir/iface_genheader.h.in
@@ -0,0 +1 @@
+#define IFACE_GENHEADER