summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-12-19 15:12:57 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-12-19 15:12:57 (GMT)
commitd42e0d552ce8335fc17ef4f24e6398b8696f7741 (patch)
tree58759cefad073eb6e85461da1e49b795aec86bde /Tests
parent33498bba9cb7e868429b4a72e9e9f60aba21d387 (diff)
parent97fae68b81d7dbb5dda9fe21f860863bcc0c7183 (diff)
downloadCMake-d42e0d552ce8335fc17ef4f24e6398b8696f7741.zip
CMake-d42e0d552ce8335fc17ef4f24e6398b8696f7741.tar.gz
CMake-d42e0d552ce8335fc17ef4f24e6398b8696f7741.tar.bz2
Merge topic 'remove-INTERFACE-build-targets'
97fae68 Remove INTERFACE build targets.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt18
-rw-r--r--Tests/InterfaceBuildTargets/CMakeLists.txt13
-rw-r--r--Tests/InterfaceBuildTargets/main.cxx5
-rw-r--r--Tests/InterfaceBuildTargets/testlib.cxx5
-rw-r--r--Tests/InterfaceLibrary/CMakeLists.txt14
-rw-r--r--Tests/InterfaceLibrary/broken.cpp2
-rw-r--r--Tests/InterfaceLibrary/dummy.cpp5
7 files changed, 21 insertions, 41 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 9e74b7d..5ea604f 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -285,24 +285,6 @@ if(BUILD_TESTING)
PASS_REGULAR_EXPRESSION "(file is not of required architecture|does not match cputype|not the architecture being linked)")
endif()
- if(CMAKE_TEST_GENERATOR MATCHES Make)
- set(InterfaceBuildTargets_libname testlib)
- if (CMAKE_TEST_GENERATOR MATCHES "Borland|Watcom")
- set(InterfaceBuildTargets_libname testlib.lib)
- endif()
- add_test(InterfaceBuildTargets ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/InterfaceBuildTargets"
- "${CMake_BINARY_DIR}/Tests/InterfaceBuildTargets"
- --build-two-config
- ${build_generator_args}
- --build-project InterfaceBuildTargets
- --build-options ${build_options}
- --test-command ${CMAKE_CMAKE_COMMAND} -E touch_nocreate ${InterfaceBuildTargets_libname}
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/InterfaceBuildTargets")
- endif()
-
list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
if(NOT QT4_FOUND)
diff --git a/Tests/InterfaceBuildTargets/CMakeLists.txt b/Tests/InterfaceBuildTargets/CMakeLists.txt
deleted file mode 100644
index a00e5d5..0000000
--- a/Tests/InterfaceBuildTargets/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-project(InterfaceBuildTargets)
-
-add_library(testlib EXCLUDE_FROM_ALL testlib.cxx)
-set_property(TARGET testlib PROPERTY PREFIX "")
-if(CMAKE_GENERATOR MATCHES "Borland|Watcom")
- # These librarians add the .lib suffix anyway.
- set_property(TARGET testlib PROPERTY SUFFIX ".lib")
-else()
- set_property(TARGET testlib PROPERTY SUFFIX "")
-endif()
-
-add_library(iface INTERFACE)
-target_link_libraries(iface INTERFACE testlib)
diff --git a/Tests/InterfaceBuildTargets/main.cxx b/Tests/InterfaceBuildTargets/main.cxx
deleted file mode 100644
index e9ad257..0000000
--- a/Tests/InterfaceBuildTargets/main.cxx
+++ /dev/null
@@ -1,5 +0,0 @@
-
-int main(int, char**)
-{
- return 0;
-}
diff --git a/Tests/InterfaceBuildTargets/testlib.cxx b/Tests/InterfaceBuildTargets/testlib.cxx
deleted file mode 100644
index 02bd6b0..0000000
--- a/Tests/InterfaceBuildTargets/testlib.cxx
+++ /dev/null
@@ -1,5 +0,0 @@
-
-void testlib(void)
-{
-
-}
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index 53aeb03..8154ced 100644
--- a/Tests/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/CMakeLists.txt
@@ -13,3 +13,17 @@ add_subdirectory(libsdir)
add_executable(sharedlibtestexe sharedlibtestexe.cpp)
target_link_libraries(sharedlibtestexe shared_iface)
+
+add_library(broken EXCLUDE_FROM_ALL broken.cpp)
+
+add_library(iface_broken INTERFACE)
+# This is not a dependency, so broken will not be built (and the error in
+# it will not be hit)
+target_link_libraries(iface_broken INTERFACE broken)
+
+add_library(iface_whitelist INTERFACE)
+# The target property CUSTOM will never be evaluated on the INTERFACE library.
+target_link_libraries(iface_whitelist INTERFACE $<$<BOOL:$<TARGET_PROPERTY:CUSTOM>>:irrelevant>)
+
+add_executable(exec_whitelist dummy.cpp)
+target_link_libraries(exec_whitelist iface_whitelist)
diff --git a/Tests/InterfaceLibrary/broken.cpp b/Tests/InterfaceLibrary/broken.cpp
new file mode 100644
index 0000000..1fd1041
--- /dev/null
+++ b/Tests/InterfaceLibrary/broken.cpp
@@ -0,0 +1,2 @@
+
+#error Broken
diff --git a/Tests/InterfaceLibrary/dummy.cpp b/Tests/InterfaceLibrary/dummy.cpp
new file mode 100644
index 0000000..341aaaf
--- /dev/null
+++ b/Tests/InterfaceLibrary/dummy.cpp
@@ -0,0 +1,5 @@
+
+int main(int, char **)
+{
+ return 0;
+}