summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Export
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt9
-rw-r--r--Tests/ExportImport/Export/testLib6.c5
-rw-r--r--Tests/ExportImport/Export/testLib6.cxx6
3 files changed, 17 insertions, 3 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 4de3f64..1588b0c 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.6)
-project(Export C)
+cmake_minimum_required (VERSION 2.7.20090711)
+project(Export C CXX)
# Pretend that RelWithDebInfo should link to debug libraries to test
# the DEBUG_CONFIGURATIONS property.
@@ -45,6 +45,8 @@ set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
add_library(testLib5 SHARED testLib5.c)
+add_library(testLib6 STATIC testLib6.cxx testLib6.c)
+
# Work-around: Visual Studio 6 does not support per-target object files.
set(VS6)
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
@@ -76,6 +78,7 @@ install(
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
testExe2lib testLib4lib testLib4libdbg testLib4libopt
+ testLib6
EXPORT exp
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib NAMELINK_SKIP
@@ -111,7 +114,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3
NAMESPACE bld_
FILE ExportBuildTree.cmake
)
-export(TARGETS testExe2 testLib4 testLib5 testExe3 testExe2lib
+export(TARGETS testExe2 testLib4 testLib5 testLib6 testExe3 testExe2lib
testLib4lib testLib4libdbg testLib4libopt
NAMESPACE bld_
APPEND FILE ExportBuildTree.cmake
diff --git a/Tests/ExportImport/Export/testLib6.c b/Tests/ExportImport/Export/testLib6.c
new file mode 100644
index 0000000..493ca07
--- /dev/null
+++ b/Tests/ExportImport/Export/testLib6.c
@@ -0,0 +1,5 @@
+extern int testLib6cxx(void);
+int testLib6(void)
+{
+ return testLib6cxx();
+}
diff --git a/Tests/ExportImport/Export/testLib6.cxx b/Tests/ExportImport/Export/testLib6.cxx
new file mode 100644
index 0000000..338e639
--- /dev/null
+++ b/Tests/ExportImport/Export/testLib6.cxx
@@ -0,0 +1,6 @@
+extern "C" int testLib6cxx(void)
+{
+ // Reference C++ standard library symbols.
+ delete new int;
+ return 0;
+}