diff options
Diffstat (limited to 'Tests')
6 files changed, 9 insertions, 15 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) diff --git a/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in b/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in new file mode 100644 index 0000000..42dd6df --- /dev/null +++ b/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in @@ -0,0 +1 @@ +#define IFACE_HEADER_BUILDDIR diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake index 08e81c6..201daa7 100644 --- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake +++ b/Tests/RunCMake/interface_library/RunCMakeTest.cmake @@ -7,5 +7,4 @@ run_cmake(whitelist) run_cmake(invalid_signature) run_cmake(global-interface) run_cmake(genex_link) -run_cmake(add_dependencies) run_cmake(add_custom_command-TARGET) diff --git a/Tests/RunCMake/interface_library/add_dependencies-result.txt b/Tests/RunCMake/interface_library/add_dependencies-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/interface_library/add_dependencies-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/interface_library/add_dependencies-stderr.txt b/Tests/RunCMake/interface_library/add_dependencies-stderr.txt deleted file mode 100644 index c550b68..0000000 --- a/Tests/RunCMake/interface_library/add_dependencies-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Error at add_dependencies.cmake:4 \(add_dependencies\): - add_dependencies Cannot add target-level dependencies to INTERFACE library - target "iface". - -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/interface_library/add_dependencies.cmake b/Tests/RunCMake/interface_library/add_dependencies.cmake deleted file mode 100644 index 12cdfb4..0000000 --- a/Tests/RunCMake/interface_library/add_dependencies.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -add_library(foo empty.cpp) -add_library(iface INTERFACE) -add_dependencies(iface foo) |