summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/Executable
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-08 17:36:18 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-08 17:36:18 (GMT)
commit65e3edea04fdd058719659e99a7a3da3dfb80b25 (patch)
treedb1d3a1c33d40bb43c5333399163a76df7aee689 /Tests/ComplexOneConfig/Executable
parent7883b6c7dc38c73638947575c75aeb06acba9c90 (diff)
downloadCMake-65e3edea04fdd058719659e99a7a3da3dfb80b25.zip
CMake-65e3edea04fdd058719659e99a7a3da3dfb80b25.tar.gz
CMake-65e3edea04fdd058719659e99a7a3da3dfb80b25.tar.bz2
ENH: use separate vars for creating c++ and c shared libraries and add a test for c libraries
Diffstat (limited to 'Tests/ComplexOneConfig/Executable')
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx11
2 files changed, 12 insertions, 1 deletions
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index a3ad8fd..7468926 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -4,7 +4,7 @@
SET_SOURCE_FILES_PROPERTIES(complex
COMPILE_FLAGS "-DFILE_HAS_EXTRA_COMPILE_FLAGS")
ADD_EXECUTABLE(complex complex)
-SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared)
+SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
TARGET_LINK_LIBRARIES(complex ${COMPLEX_LIBS})
#
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 61ffd8f..6607d7d 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -2,6 +2,9 @@
#include "ExtraSources/file1.h"
#include "file2.h"
#include "sharedFile.h"
+extern "C" {
+#include "testConly.h"
+}
#include "cmStandardIncludes.h"
#include "cmSystemTools.h"
@@ -103,6 +106,14 @@ int main()
{
cmPassed("Call to sharedFunction from shared library worked.");
}
+ if(CsharedFunction() != 1)
+ {
+ cmFailed("Call to C sharedFunction from shared library failed.");
+ }
+ else
+ {
+ cmPassed("Call to C sharedFunction from shared library worked.");
+ }
if(file1() != 1)
{