diff options
author | Brad King <brad.king@kitware.com> | 2018-10-03 12:04:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-10-03 12:04:35 (GMT) |
commit | 9fc3024f62304a65c2fb1eaf5303e417530c650d (patch) | |
tree | ae35d758ba00f50b6ebaa5ed9634fe467137140a /Tests | |
parent | a4b9e59568825a440bbbf04504cb556288aed456 (diff) | |
parent | 375b420fdfe4eb34e92b98bb648ba37de3691c2e (diff) | |
download | CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.zip CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.tar.gz CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.tar.bz2 |
Merge topic 'fix-csharp-target-type'
375b420fdf CSharp: Fix regression in VS project type selection
8b21aa0af0 VS: Fix CSharp flag selection when linking to a static C++ library
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2427
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CSharpLinkToCxx/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CSharpLinkToCxx/cpp_static.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Tests/CSharpLinkToCxx/CMakeLists.txt b/Tests/CSharpLinkToCxx/CMakeLists.txt index 153c57c..a3067af 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 0000000..9af2b6e --- /dev/null +++ b/Tests/CSharpLinkToCxx/cpp_static.cpp @@ -0,0 +1,3 @@ +void cpp_static() +{ +} |