diff options
author | Brad King <brad.king@kitware.com> | 2017-03-09 20:28:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-09 21:25:14 (GMT) |
commit | 25d261efa7c80ce7d9cbcb8b94d5d4a77cb12aaf (patch) | |
tree | d6b00210307b010f08388a337fdb5b879be25bd3 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 1e0a9ac45d51e0076222026b9c44604b287a6eae (diff) | |
download | CMake-25d261efa7c80ce7d9cbcb8b94d5d4a77cb12aaf.zip CMake-25d261efa7c80ce7d9cbcb8b94d5d4a77cb12aaf.tar.gz CMake-25d261efa7c80ce7d9cbcb8b94d5d4a77cb12aaf.tar.bz2 |
Refactor module definition file selection
Create a `ModuleDefinitionInfo` structure for each configuration of a
target to hold corresponding information about the selected module
definition file (`.def` source).
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 6e976e1..e14e20c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -996,9 +996,11 @@ 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()); } @@ -1362,7 +1364,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; @@ -1374,9 +1375,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); |