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/cmVisualStudio10TargetGenerator.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/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a5b1edf..698271d 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2914,10 +2914,10 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( linkOptions.Parse(flags.c_str()); if (this->MSTools) { - if (cmSourceFile const* defsrc = - this->GeneratorTarget->GetModuleDefinitionFile("")) { - linkOptions.AddFlag("ModuleDefinitionFile", - defsrc->GetFullPath().c_str()); + cmGeneratorTarget::ModuleDefinitionInfo const* mdi = + this->GeneratorTarget->GetModuleDefinitionInfo(config); + if (mdi && !mdi->DefFile.empty()) { + linkOptions.AddFlag("ModuleDefinitionFile", mdi->DefFile.c_str()); } linkOptions.AppendFlag("IgnoreSpecificDefaultLibraries", "%(IgnoreSpecificDefaultLibraries)"); |