[cmake-commits] martink committed cmMakefile.cxx 1.360 1.361 cmTarget.cxx 1.106 1.107

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Nov 16 10:57:05 EST 2006


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv26778

Modified Files:
	cmMakefile.cxx cmTarget.cxx 
Log Message:
ENH: fix a bug with useing debuf optimized libs from other builds


Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- cmTarget.cxx	16 Oct 2006 22:17:14 -0000	1.106
+++ cmTarget.cxx	16 Nov 2006 15:57:00 -0000	1.107
@@ -737,7 +737,9 @@
 {
   // It's already been emitted
   if( emitted.find(lib) != emitted.end() )
+    {
     return;
+    }
 
   // Emit the dependencies only if this library node hasn't been
   // visited before. If it has, then we have a cycle. The recursion
@@ -797,7 +799,9 @@
   // If the library is already in the dependency map, then it has
   // already been fully processed.
   if( dep_map.find(lib) != dep_map.end() )
+    {
     return;
+    }
 
   const char* deps = mf.GetDefinition( (lib+"_LIB_DEPENDS").c_str() );
   if( deps && strcmp(deps,"") != 0 )

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.360
retrieving revision 1.361
diff -u -d -r1.360 -r1.361
--- cmMakefile.cxx	5 Oct 2006 12:55:59 -0000	1.360
+++ cmMakefile.cxx	16 Nov 2006 15:57:00 -0000	1.361
@@ -954,6 +954,21 @@
           }
         }
       }
+    // make sure the tpye is correct
+    std::string linkType = lib;
+    linkType += "_LINK_TYPE";
+    const char* linkTypeString = this->GetDefinition( linkType.c_str() );
+    if(linkTypeString)
+      {
+      if(strcmp(linkTypeString, "debug") == 0)
+        {
+        llt = cmTarget::DEBUG;
+        }
+      if(strcmp(linkTypeString, "optimized") == 0)
+        {
+        llt = cmTarget::OPTIMIZED;
+        }
+      }
     i->second.AddLinkLibrary( *this, target, lib, llt );
     }
   else



More information about the Cmake-commits mailing list