summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Import/A/imp_testExe1.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-04-06 15:11:33 (GMT)
committerBrad King <brad.king@kitware.com>2009-04-06 15:11:33 (GMT)
commitd6bdaf9f1371a4c5a4e88dff89855aee47e49096 (patch)
tree5bbdbb76661fad78af4f5d1aa5f7280b1dc2cb49 /Tests/ExportImport/Import/A/imp_testExe1.c
parent85bffd3eeb7ae6b3ae35a5da381aa55edff0b4be (diff)
downloadCMake-d6bdaf9f1371a4c5a4e88dff89855aee47e49096.zip
CMake-d6bdaf9f1371a4c5a4e88dff89855aee47e49096.tar.gz
CMake-d6bdaf9f1371a4c5a4e88dff89855aee47e49096.tar.bz2
ENH: Test transitive link to subdir-imported lib
This tests linking to an imported target that is not visible but is a transitive dependency of a target that is visible. See issue #8843.
Diffstat (limited to 'Tests/ExportImport/Import/A/imp_testExe1.c')
-rw-r--r--Tests/ExportImport/Import/A/imp_testExe1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/A/imp_testExe1.c b/Tests/ExportImport/Import/A/imp_testExe1.c
new file mode 100644
index 0000000..6424d33
--- /dev/null
+++ b/Tests/ExportImport/Import/A/imp_testExe1.c
@@ -0,0 +1,21 @@
+extern int generated_by_testExe1();
+extern int generated_by_testExe3();
+extern int testLib2();
+extern int testLib3();
+extern int testLib4();
+extern int testLib4lib();
+
+/* Switch a symbol between debug and optimized builds to make sure the
+ proper library is found from the testLib4 link interface. */
+#ifdef EXE_DBG
+# define testLib4libcfg testLib4libdbg
+#else
+# define testLib4libcfg testLib4libopt
+#endif
+extern testLib4libcfg(void);
+
+int main()
+{
+ return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
+ + generated_by_testExe3() + testLib4lib() + testLib4libcfg());
+}