From 0e5d18e4881674a7ee515448eb4f5038e0eccad3 Mon Sep 17 00:00:00 2001 From: Vitaly Kruglikov Date: Tue, 31 Jan 2017 23:20:43 -0800 Subject: [PATCH] NUP-2320 Support "export all symbols" for MSVC as well as MINGW, using compiler-specific techniques. --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3ad220ef99..e21c09164d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -506,6 +506,11 @@ if(WIN32) # __declspec(dllexport) attribute set(_SRC_SHARED_NUPICCORE_LINK_FLAGS "${_SRC_SHARED_NUPICCORE_LINK_FLAGS} -Wl,-export-all-symbols") + elseif(MSVC) + set_target_properties(${_SRC_LIB_SHARED_NUPICCORE} PROPERTIES + WINDOWS_EXPORT_ALL_SYMBOLS ON) + else() + message (FATAL_ERROR "Unsupported compiler! CMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}") endif() endif()