From 4dde0bc8ef1d953b8e4b13a2e465d756b5274933 Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Sat, 28 Jan 2017 17:10:02 +0100 Subject: VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for external objects Teach Visual Studio generators to include external object files in the list of objects whose symbols are to be exported. The Makefile and Ninja generators already did this. --- Source/cmGlobalVisualStudioGenerator.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 5edb81f..cc2536c 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -856,6 +856,14 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand( std::string objFile = obj_dir + map_it->second; objs.push_back(objFile); } + std::vector externalObjectSources; + gt->GetExternalObjects(externalObjectSources, configName); + for (std::vector::const_iterator it = + externalObjectSources.begin(); + it != externalObjectSources.end(); ++it) { + objs.push_back((*it)->GetFullPath()); + } + gt->UseObjectLibraries(objs, configName); for (std::vector::iterator it = objs.begin(); it != objs.end(); ++it) { -- cgit v0.12