Make generated C++ code compilable with C++/CLI in MSVC
Client: cpp
Patch: Shaoyu Zhang
This closes #3234
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index 31acf12..3ed1d20 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -67,6 +67,11 @@
)
add_library(testgencpp_cob STATIC ${testgencpp_cob_SOURCES})
+if (WIN32 AND MSVC)
+ add_library(testgencppCLI STATIC ${testgencpp_SOURCES})
+ set_target_properties(testgencppCLI PROPERTIES COMMON_LANGUAGE_RUNTIME "")
+endif()
+
add_executable(Benchmark Benchmark.cpp)
target_link_libraries(Benchmark testgencpp)
target_link_libraries(Benchmark thrift)