diff options
author | Brad King <brad.king@kitware.com> | 2018-04-26 12:55:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-26 12:55:19 (GMT) |
commit | e52cf1034f1cb712dca28131fc113db0fb580db9 (patch) | |
tree | 69dd7745865841642522015ef1e96c2021355902 /Tests/RunCMake/CSharpReferenceImport/ImportLib.cmake | |
parent | 6fd60c6ef0053406b4a88fc2b79c00f49c5bac7a (diff) | |
parent | de549083e34906e4778a709497adc99f7f0dccbb (diff) | |
download | CMake-e52cf1034f1cb712dca28131fc113db0fb580db9.zip CMake-e52cf1034f1cb712dca28131fc113db0fb580db9.tar.gz CMake-e52cf1034f1cb712dca28131fc113db0fb580db9.tar.bz2 |
Merge topic 'csharp_reference_imported_targets'
de549083e3 cmVisualStudio10TargetGenerator: warn if /clr flag is set manually
59ec7d50bd cmVisualStudio10TargetGenerator: fix for backward compatibility
663f5120f4 cmGlobalVisualStudioGenerator: remove TargetCanBeReferenced()
359544a907 add tests for using target_link_libraries() with imported managed targets
43571073e0 cmVisualStudio10TargetGenerator: store managed reference information in maps
16fec7e2fc cmVisualStudio10TargetGenerator: make some methods config aware
f3c6828876 cmVisualStudio10TargetGenerator: /clr compatible flags for managed tgt
f9042d807d remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1805
Diffstat (limited to 'Tests/RunCMake/CSharpReferenceImport/ImportLib.cmake')
-rw-r--r-- | Tests/RunCMake/CSharpReferenceImport/ImportLib.cmake | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Tests/RunCMake/CSharpReferenceImport/ImportLib.cmake b/Tests/RunCMake/CSharpReferenceImport/ImportLib.cmake new file mode 100644 index 0000000..5ad6e76 --- /dev/null +++ b/Tests/RunCMake/CSharpReferenceImport/ImportLib.cmake @@ -0,0 +1,45 @@ +enable_language(CXX CSharp) + +if(NOT DEFINED exportFileName OR + NOT DEFINED exportNameSpace OR + NOT DEFINED exportTargetName) + message(FATAL_ERROR "export information missing") +endif() + +add_library(${exportTargetName}CSharp SHARED + ImportLib.cs) + +# native c++ dll +add_library(${exportTargetName}Native SHARED + ImportLibNative.h + ImportLibNative.cxx) + +# mixed c++ dll +add_library(${exportTargetName}Mixed SHARED + ImportLibMixed.cxx + ImportLibMixedNative.h + ImportLibMixedNative.cxx) +set_target_properties(${exportTargetName}Mixed PROPERTIES + COMMON_LANGUAGE_RUNTIME "") + +# pure c++ dll +add_library(${exportTargetName}Pure SHARED + ImportLibPure.cxx) +set_target_properties(${exportTargetName}Pure PROPERTIES + COMMON_LANGUAGE_RUNTIME "pure") + +# safe c++ dll +add_library(${exportTargetName}Safe SHARED + ImportLibSafe.cxx) +set_target_properties(${exportTargetName}Safe PROPERTIES + COMMON_LANGUAGE_RUNTIME "safe") + +# generate export file +export(TARGETS + ${exportTargetName}CSharp + ${exportTargetName}Native + ${exportTargetName}Mixed + ${exportTargetName}Pure + ${exportTargetName}Safe + NAMESPACE "${exportNameSpace}:" + FILE "${exportFileName}") |