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.
This commit is contained in:
Zsolt Parragi 2017-01-28 17:10:02 +01:00 committed by Brad King
parent b30ac988d0
commit 4dde0bc8ef

View File

@ -856,6 +856,14 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
std::string objFile = obj_dir + map_it->second;
objs.push_back(objFile);
}
std::vector<cmSourceFile const*> externalObjectSources;
gt->GetExternalObjects(externalObjectSources, configName);
for (std::vector<cmSourceFile const*>::const_iterator it =
externalObjectSources.begin();
it != externalObjectSources.end(); ++it) {
objs.push_back((*it)->GetFullPath());
}
gt->UseObjectLibraries(objs, configName);
for (std::vector<std::string>::iterator it = objs.begin(); it != objs.end();
++it) {