[cmake-commits] hoffman committed cmMakefileTargetGenerator.cxx 1.47
1.48
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Nov 27 16:13:43 EST 2006
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv28820/Source
Modified Files:
cmMakefileTargetGenerator.cxx
Log Message:
ENH: make sure things do not depend on optimized libraries if they are debug, and the other way around as well
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- cmMakefileTargetGenerator.cxx 10 Oct 2006 01:25:58 -0000 1.47
+++ cmMakefileTargetGenerator.cxx 27 Nov 2006 21:13:41 -0000 1.48
@@ -1136,7 +1136,13 @@
{
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 @@
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)
{
More information about the Cmake-commits
mailing list