summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx45
1 files changed, 15 insertions, 30 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 38dda04..7c33821 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -16,6 +16,7 @@
#include "cmGeneratedFileStream.h"
#include <ctype.h> // for isspace
+#include <windows.h>
static bool cmLVS7G_IsFAT(const char* dir);
@@ -787,7 +788,6 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
<< this->ConvertToXMLOutputPath(modDir.c_str())
<< "\\$(ConfigurationName)\"\n";
}
- targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
fout << "\t\t\t\tAdditionalIncludeDirectories=\"";
std::vector<std::string> includes;
this->GetIncludeDirectories(includes, target, "C", configName);
@@ -997,19 +997,14 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
linkOptions.AddTable(cmLocalVisualStudio7GeneratorLinkFlagTable);
linkOptions.Parse(extraLinkOptions.c_str());
- if (!this->ModuleDefinitionFile.empty()) {
- std::string defFile = this->ConvertToOutputFormat(
- this->ModuleDefinitionFile, cmOutputConverter::SHELL);
+ cmGeneratorTarget::ModuleDefinitionInfo const* mdi =
+ target->GetModuleDefinitionInfo(configName);
+ if (mdi && !mdi->DefFile.empty()) {
+ std::string defFile =
+ this->ConvertToOutputFormat(mdi->DefFile, cmOutputConverter::SHELL);
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;
@@ -1090,7 +1085,6 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
if (!gg->NeedLinkLibraryDependencies(target)) {
fout << "\t\t\t\tLinkLibraryDependencies=\"false\"\n";
}
- linkOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
// Use the NOINHERIT macro to avoid getting VS project default
// libraries which may be set by the user to something bad.
fout << "\t\t\t\tAdditionalDependencies=\"$(NOINHERIT) "
@@ -1176,7 +1170,6 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
if (!gg->NeedLinkLibraryDependencies(target)) {
fout << "\t\t\t\tLinkLibraryDependencies=\"false\"\n";
}
- linkOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
// Use the NOINHERIT macro to avoid getting VS project default
// libraries which may be set by the user to something bad.
fout << "\t\t\t\tAdditionalDependencies=\"$(NOINHERIT) "
@@ -1365,7 +1358,6 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
std::vector<cmSourceGroup> sourceGroups = this->Makefile->GetSourceGroups();
// get the classes from the source lists then add them to the groups
- this->ModuleDefinitionFile = "";
std::vector<cmSourceFile*> classes;
if (!target->GetConfigCommonSourceFiles(classes)) {
return;
@@ -1377,9 +1369,6 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
}
// Add the file to the list of sources.
std::string source = (*i)->GetFullPath();
- if (cmSystemTools::UpperCase((*i)->GetExtension()) == "DEF") {
- this->ModuleDefinitionFile = (*i)->GetFullPath();
- }
cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
sourceGroup->AssignSource(*i);
@@ -1675,7 +1664,6 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
fileOptions.Parse(fc.CompileFlags.c_str());
fileOptions.AddDefines(fc.CompileDefs.c_str());
fileOptions.AddDefines(fc.CompileDefsConfig.c_str());
- fileOptions.OutputAdditionalOptions(fout, "\t\t\t\t\t", "\n");
fileOptions.OutputFlagMap(fout, "\t\t\t\t\t");
fileOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t\t", "\n",
ppLang);
@@ -1829,17 +1817,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->DefFileGenerated) {
+ 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());
@@ -2130,7 +2116,6 @@ std::string cmLocalVisualStudio7Generator::GetTargetDirectory(
return dir;
}
-#include <windows.h>
static bool cmLVS7G_IsFAT(const char* dir)
{
if (dir[0] && dir[1] == ':') {