diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-11-27 21:13:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-11-27 21:13:41 (GMT) |
commit | f2e8fd06c2c2db4ff69bfd7449425bd088c6b920 (patch) | |
tree | 7cde20d1fabc2599e9da7ae6efda7efb511131fe /Source | |
parent | 31a576abe674ba12021f75b574a4787458990cbd (diff) | |
download | CMake-f2e8fd06c2c2db4ff69bfd7449425bd088c6b920.zip CMake-f2e8fd06c2c2db4ff69bfd7449425bd088c6b920.tar.gz CMake-f2e8fd06c2c2db4ff69bfd7449425bd088c6b920.tar.bz2 |
ENH: make sure things do not depend on optimized libraries if they are debug, and the other way around as well
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 381df2e..1adff5c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1136,7 +1136,13 @@ void cmMakefileTargetGenerator { return; } - + // Compute which library configuration to link. + cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED; + if(cmSystemTools::UpperCase( + this->LocalGenerator->ConfigurationName.c_str()) == "DEBUG") + { + linkType = cmTarget::DEBUG; + } // Keep track of dependencies already listed. std::set<cmStdString> emitted; @@ -1149,6 +1155,14 @@ void cmMakefileTargetGenerator for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin(); lib != tlibs.end(); ++lib) { + // skip the library if it is not general and the link type + // does not match the current target + if(lib->second != cmTarget::GENERAL && + lib->second != linkType) + { + continue; + } + // Don't emit the same library twice for this target. if(emitted.insert(lib->first).second) { |