[cmake-commits] king committed cmLocalGenerator.cxx 1.209 1.210

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Apr 17 23:16:37 EDT 2007


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

Modified Files:
	cmLocalGenerator.cxx 
Log Message:
BUG: Fix ComputeLinkInformation for non-linked targets.  Why is it called for utility targets anyway?


Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -d -r1.209 -r1.210
--- cmLocalGenerator.cxx	17 Apr 2007 20:11:00 -0000	1.209
+++ cmLocalGenerator.cxx	18 Apr 2007 03:16:35 -0000	1.210
@@ -1642,13 +1642,6 @@
   // Get the language used for linking.
   const char* linkLanguage =
     target.GetLinkerLanguage(this->GetGlobalGenerator());
-  if(!linkLanguage)
-    {
-    cmSystemTools::
-      Error("CMake can not determine linker language for target:",
-            target.GetName());
-    return;
-    }
 
   // Check whether we should use an import library for linking a target.
   bool implib =
@@ -1660,6 +1653,13 @@
   const char* loader_flag = 0;
   if(!implib && target.GetType() == cmTarget::MODULE_LIBRARY)
     {
+    if(!linkLanguage)
+      {
+      cmSystemTools::
+        Error("CMake can not determine linker language for target:",
+          target.GetName());
+      return;
+      }
     std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
     loader_flag_var += linkLanguage;
     loader_flag_var += "_FLAG";
@@ -1766,6 +1766,13 @@
     }
   if(target_type_str)
     {
+    if(!linkLanguage)
+      {
+      cmSystemTools::
+        Error("CMake can not determine linker language for target:",
+          target.GetName());
+      return;
+      }
     std::string static_link_type_flag_var = "CMAKE_";
     static_link_type_flag_var += target_type_str;
     static_link_type_flag_var += "_LINK_STATIC_";



More information about the Cmake-commits mailing list