summaryrefslogtreecommitdiff
path: root/Tests/ComplexOneConfig/Library
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-08 13:36:18 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-08 13:36:18 -0400
commit65e3edea04fdd058719659e99a7a3da3dfb80b25 (patch)
treedb1d3a1c33d40bb43c5333399163a76df7aee689 /Tests/ComplexOneConfig/Library
parent7883b6c7dc38c73638947575c75aeb06acba9c90 (diff)
downloadcmake-65e3edea04fdd058719659e99a7a3da3dfb80b25.tar.gz
ENH: use separate vars for creating c++ and c shared libraries and add a test for c libraries
Diffstat (limited to 'Tests/ComplexOneConfig/Library')
-rw-r--r--Tests/ComplexOneConfig/Library/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/Library/testConly.c6
-rw-r--r--Tests/ComplexOneConfig/Library/testConly.h12
3 files changed, 20 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt
index c01f501249..19cb6cd3fb 100644
--- a/Tests/ComplexOneConfig/Library/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt
@@ -26,6 +26,8 @@ ADD_LIBRARY(CMakeTestLibrary LibrarySources)
SOURCE_FILES(SharedLibrarySources sharedFile)
ADD_LIBRARY(CMakeTestLibraryShared SHARED SharedLibrarySources)
+ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c)
+
#
# Attach a post-build custom-command to the lib.
# It runs ${CREATE_FILE_EXE} which will create a file.
diff --git a/Tests/ComplexOneConfig/Library/testConly.c b/Tests/ComplexOneConfig/Library/testConly.c
new file mode 100644
index 0000000000..d2d5294b1b
--- /dev/null
+++ b/Tests/ComplexOneConfig/Library/testConly.c
@@ -0,0 +1,6 @@
+#include "sharedFile.h"
+
+int CsharedFunction()
+{
+ return 1;
+}
diff --git a/Tests/ComplexOneConfig/Library/testConly.h b/Tests/ComplexOneConfig/Library/testConly.h
new file mode 100644
index 0000000000..8553a6b592
--- /dev/null
+++ b/Tests/ComplexOneConfig/Library/testConly.h
@@ -0,0 +1,12 @@
+#if defined(_WIN32) || defined(WIN32) /* Win32 version */
+#ifdef CMakeTestLibraryShared_EXPORTS
+# define CMakeTest_EXPORT __declspec(dllexport)
+#else
+# define CMakeTest_EXPORT __declspec(dllimport)
+#endif
+#else
+// unix needs nothing
+#define CMakeTest_EXPORT
+#endif
+
+CMakeTest_EXPORT int CsharedFunction();