summaryrefslogtreecommitdiff
path: root/Tests/InterfaceLinkLibraries
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
commit915c76ded744c0f5f151402b9fa69f3fd8452573 (patch)
treeca6a387466543248890f346847acaa8343989b22 /Tests/InterfaceLinkLibraries
parent317dbdb79761ef65e45c7358cfc7571c6afa54ad (diff)
downloadcmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.gz
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.bz2
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.zip
Imported Upstream version 3.9.4upstream/3.9.4
Diffstat (limited to 'Tests/InterfaceLinkLibraries')
-rw-r--r--Tests/InterfaceLinkLibraries/CMakeLists.txt12
-rw-r--r--Tests/InterfaceLinkLibraries/bang.h2
-rw-r--r--Tests/InterfaceLinkLibraries/bar.cpp14
-rw-r--r--Tests/InterfaceLinkLibraries/bar.h2
-rw-r--r--Tests/InterfaceLinkLibraries/foo.h2
-rw-r--r--Tests/InterfaceLinkLibraries/main.cpp8
-rw-r--r--Tests/InterfaceLinkLibraries/zot.cpp6
-rw-r--r--Tests/InterfaceLinkLibraries/zot.h7
-rw-r--r--Tests/InterfaceLinkLibraries/zot_vs6_1.cpp1
-rw-r--r--Tests/InterfaceLinkLibraries/zot_vs6_2.cpp1
-rw-r--r--Tests/InterfaceLinkLibraries/zot_vs6_3.cpp1
-rw-r--r--Tests/InterfaceLinkLibraries/zot_vs6_4.cpp1
12 files changed, 45 insertions, 12 deletions
diff --git a/Tests/InterfaceLinkLibraries/CMakeLists.txt b/Tests/InterfaceLinkLibraries/CMakeLists.txt
index bd0cf748e..9e14c4400 100644
--- a/Tests/InterfaceLinkLibraries/CMakeLists.txt
+++ b/Tests/InterfaceLinkLibraries/CMakeLists.txt
@@ -9,6 +9,9 @@ target_compile_definitions(foo_shared INTERFACE FOO_LIBRARY)
add_library(bar_shared SHARED bar_vs6_1.cpp)
target_compile_definitions(bar_shared INTERFACE BAR_LIBRARY)
set_property(TARGET bar_shared APPEND PROPERTY INTERFACE_LINK_LIBRARIES foo_shared)
+add_library(zot_shared SHARED zot_vs6_1.cpp)
+target_compile_definitions(zot_shared INTERFACE ZOT_LIBRARY)
+set_property(TARGET bar_shared APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_shared>)
add_executable(shared_test main_vs6_1.cpp)
set_property(TARGET shared_test APPEND PROPERTY LINK_LIBRARIES bar_shared)
@@ -18,6 +21,9 @@ target_compile_definitions(foo_static INTERFACE FOO_LIBRARY)
add_library(bar_static STATIC bar_vs6_2.cpp)
target_compile_definitions(bar_static INTERFACE BAR_LIBRARY)
set_property(TARGET bar_static APPEND PROPERTY INTERFACE_LINK_LIBRARIES foo_static)
+add_library(zot_static STATIC zot_vs6_2.cpp)
+target_compile_definitions(zot_static INTERFACE ZOT_LIBRARY)
+set_property(TARGET bar_static APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_static>)
add_executable(static_test main_vs6_2.cpp)
set_property(TARGET static_test APPEND PROPERTY LINK_LIBRARIES bar_static)
@@ -31,6 +37,9 @@ target_compile_definitions(bar_shared_private INTERFACE BAR_LIBRARY)
target_compile_definitions(bar_shared_private PRIVATE BAR_USE_BANG)
set_property(TARGET bar_shared_private APPEND PROPERTY LINK_LIBRARIES bang_shared_private)
set_property(TARGET bar_shared_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES foo_shared_private)
+add_library(zot_shared_private SHARED zot_vs6_3.cpp)
+target_compile_definitions(zot_shared_private INTERFACE ZOT_LIBRARY)
+set_property(TARGET bar_shared_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_shared_private>)
add_executable(shared_private_test main_vs6_3.cpp)
set_property(TARGET shared_private_test APPEND PROPERTY LINK_LIBRARIES bar_shared_private)
@@ -44,6 +53,9 @@ target_compile_definitions(bar_static_private INTERFACE BAR_LIBRARY)
target_compile_definitions(bar_static_private PRIVATE BAR_USE_BANG)
set_property(TARGET bar_static_private APPEND PROPERTY LINK_LIBRARIES bang_static_private)
set_property(TARGET bar_static_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:bang_static_private> foo_static_private)
+add_library(zot_static_private STATIC zot_vs6_4.cpp)
+target_compile_definitions(zot_static_private INTERFACE ZOT_LIBRARY)
+set_property(TARGET bar_static_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_static_private>)
add_executable(InterfaceLinkLibraries main_vs6_4.cpp)
set_property(TARGET InterfaceLinkLibraries APPEND PROPERTY LINK_LIBRARIES bar_static_private)
diff --git a/Tests/InterfaceLinkLibraries/bang.h b/Tests/InterfaceLinkLibraries/bang.h
index acffb39d9..908f20cd9 100644
--- a/Tests/InterfaceLinkLibraries/bang.h
+++ b/Tests/InterfaceLinkLibraries/bang.h
@@ -1,4 +1,4 @@
#ifdef _WIN32
__declspec(dllexport)
#endif
-int bang();
+ int bang();
diff --git a/Tests/InterfaceLinkLibraries/bar.cpp b/Tests/InterfaceLinkLibraries/bar.cpp
index f39bfa55e..228ed803a 100644
--- a/Tests/InterfaceLinkLibraries/bar.cpp
+++ b/Tests/InterfaceLinkLibraries/bar.cpp
@@ -4,14 +4,14 @@
#endif
#ifdef BAR_USE_BANG
-# ifndef BANG_LIBRARY
-# error Expected BANG_LIBRARY
-# endif
-# include "bang.h"
+#ifndef BANG_LIBRARY
+#error Expected BANG_LIBRARY
+#endif
+#include "bang.h"
#else
-# ifdef BANG_LIBRARY
-# error Unexpected BANG_LIBRARY
-# endif
+#ifdef BANG_LIBRARY
+#error Unexpected BANG_LIBRARY
+#endif
#endif
#include "bar.h"
diff --git a/Tests/InterfaceLinkLibraries/bar.h b/Tests/InterfaceLinkLibraries/bar.h
index f83b37e57..f31a25f32 100644
--- a/Tests/InterfaceLinkLibraries/bar.h
+++ b/Tests/InterfaceLinkLibraries/bar.h
@@ -4,4 +4,4 @@
#ifdef _WIN32
__declspec(dllexport)
#endif
-int bar();
+ int bar();
diff --git a/Tests/InterfaceLinkLibraries/foo.h b/Tests/InterfaceLinkLibraries/foo.h
index e12e23c49..9b7388576 100644
--- a/Tests/InterfaceLinkLibraries/foo.h
+++ b/Tests/InterfaceLinkLibraries/foo.h
@@ -1,4 +1,4 @@
#ifdef _WIN32
__declspec(dllexport)
#endif
-int foo();
+ int foo();
diff --git a/Tests/InterfaceLinkLibraries/main.cpp b/Tests/InterfaceLinkLibraries/main.cpp
index a54076a75..6e1295a10 100644
--- a/Tests/InterfaceLinkLibraries/main.cpp
+++ b/Tests/InterfaceLinkLibraries/main.cpp
@@ -11,9 +11,13 @@
#error Unexpected BANG_LIBRARY
#endif
-#include "bar.h"
+#ifdef ZOT_LIBRARY
+#error Unexpected ZOT_LIBRARY
+#endif
+
+#include "zot.h"
int main(void)
{
- return foo() + bar();
+ return foo() + bar() + zot();
}
diff --git a/Tests/InterfaceLinkLibraries/zot.cpp b/Tests/InterfaceLinkLibraries/zot.cpp
new file mode 100644
index 000000000..69462b063
--- /dev/null
+++ b/Tests/InterfaceLinkLibraries/zot.cpp
@@ -0,0 +1,6 @@
+#include "zot.h"
+
+int zot()
+{
+ return 0;
+}
diff --git a/Tests/InterfaceLinkLibraries/zot.h b/Tests/InterfaceLinkLibraries/zot.h
new file mode 100644
index 000000000..e80328b36
--- /dev/null
+++ b/Tests/InterfaceLinkLibraries/zot.h
@@ -0,0 +1,7 @@
+
+#include "bar.h"
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ int zot();
diff --git a/Tests/InterfaceLinkLibraries/zot_vs6_1.cpp b/Tests/InterfaceLinkLibraries/zot_vs6_1.cpp
new file mode 100644
index 000000000..c588c5fe9
--- /dev/null
+++ b/Tests/InterfaceLinkLibraries/zot_vs6_1.cpp
@@ -0,0 +1 @@
+#include "zot.cpp"
diff --git a/Tests/InterfaceLinkLibraries/zot_vs6_2.cpp b/Tests/InterfaceLinkLibraries/zot_vs6_2.cpp
new file mode 100644
index 000000000..c588c5fe9
--- /dev/null
+++ b/Tests/InterfaceLinkLibraries/zot_vs6_2.cpp
@@ -0,0 +1 @@
+#include "zot.cpp"
diff --git a/Tests/InterfaceLinkLibraries/zot_vs6_3.cpp b/Tests/InterfaceLinkLibraries/zot_vs6_3.cpp
new file mode 100644
index 000000000..c588c5fe9
--- /dev/null
+++ b/Tests/InterfaceLinkLibraries/zot_vs6_3.cpp
@@ -0,0 +1 @@
+#include "zot.cpp"
diff --git a/Tests/InterfaceLinkLibraries/zot_vs6_4.cpp b/Tests/InterfaceLinkLibraries/zot_vs6_4.cpp
new file mode 100644
index 000000000..c588c5fe9
--- /dev/null
+++ b/Tests/InterfaceLinkLibraries/zot_vs6_4.cpp
@@ -0,0 +1 @@
+#include "zot.cpp"