summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx27
1 files changed, 9 insertions, 18 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index e14e20c..8026de9 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1004,13 +1004,6 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str());
}
- if ((target->GetType() == cmStateEnums::SHARED_LIBRARY ||
- target->IsExecutableWithExports()) &&
- this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) {
- if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
- linkOptions.AddFlag("ModuleDefinitionFile", "$(IntDir)/exportall.def");
- }
- }
switch (target->GetType()) {
case cmStateEnums::UNKNOWN_LIBRARY:
break;
@@ -1823,17 +1816,15 @@ void cmLocalVisualStudio7Generator::OutputTargetRules(
tool = this->FortranProject ? "VFPreLinkEventTool" : "VCPreLinkEventTool";
event.Start(tool);
bool addedPrelink = false;
- if ((target->GetType() == cmStateEnums::SHARED_LIBRARY ||
- target->IsExecutableWithExports()) &&
- this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) {
- if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
- addedPrelink = true;
- std::vector<cmCustomCommand> commands = target->GetPreLinkCommands();
- cmGlobalVisualStudioGenerator* gg =
- static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator);
- gg->AddSymbolExportCommand(target, commands, configName);
- event.Write(commands);
- }
+ cmGeneratorTarget::ModuleDefinitionInfo const* mdi =
+ target->GetModuleDefinitionInfo(configName);
+ if (mdi && mdi->WindowsExportAllSymbols) {
+ addedPrelink = true;
+ std::vector<cmCustomCommand> commands = target->GetPreLinkCommands();
+ cmGlobalVisualStudioGenerator* gg =
+ static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator);
+ gg->AddSymbolExportCommand(target, commands, configName);
+ event.Write(commands);
}
if (!addedPrelink) {
event.Write(target->GetPreLinkCommands());