summaryrefslogtreecommitdiff
path: root/Tests/CSharpLinkToCxx
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CSharpLinkToCxx')
-rw-r--r--Tests/CSharpLinkToCxx/CMakeLists.txt6
-rw-r--r--Tests/CSharpLinkToCxx/cpp_static.cpp3
2 files changed, 9 insertions, 0 deletions
diff --git a/Tests/CSharpLinkToCxx/CMakeLists.txt b/Tests/CSharpLinkToCxx/CMakeLists.txt
index 153c57c90..a3067afa2 100644
--- a/Tests/CSharpLinkToCxx/CMakeLists.txt
+++ b/Tests/CSharpLinkToCxx/CMakeLists.txt
@@ -21,3 +21,9 @@ target_link_libraries(CSharpLinkToCxx CLIApp)
# because it is unmanaged
add_library(CppNativeApp SHARED cpp_native.hpp cpp_native.cpp)
target_link_libraries(CSharpLinkToCxx CppNativeApp)
+
+# Link a static C++ library into the CSharp executable.
+# We do not actually use any symbols but this helps cover
+# link language selection.
+add_library(CppStaticLib STATIC cpp_static.cpp)
+target_link_libraries(CSharpLinkToCxx CppStaticLib)
diff --git a/Tests/CSharpLinkToCxx/cpp_static.cpp b/Tests/CSharpLinkToCxx/cpp_static.cpp
new file mode 100644
index 000000000..9af2b6ea3
--- /dev/null
+++ b/Tests/CSharpLinkToCxx/cpp_static.cpp
@@ -0,0 +1,3 @@
+void cpp_static()
+{
+}