[cmake-commits] hoffman committed cmMacroCommand.cxx 1.25.2.3 1.25.2.4

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Dec 1 11:04:25 EST 2006


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

Modified Files:
      Tag: CMake-2-4
	cmMacroCommand.cxx 
Log Message:
ENH: merge in fix for seg fault and move to RC 4


Index: cmMacroCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMacroCommand.cxx,v
retrieving revision 1.25.2.3
retrieving revision 1.25.2.4
diff -u -d -r1.25.2.3 -r1.25.2.4
--- cmMacroCommand.cxx	13 Oct 2006 14:52:05 -0000	1.25.2.3
+++ cmMacroCommand.cxx	1 Dec 2006 16:04:23 -0000	1.25.2.4
@@ -235,14 +235,20 @@
       }
     if(!this->Makefile->ExecuteCommand(newLFF))
       {
-      const char* filePath = args[0].FilePath;
-      if(!filePath)
+      cmListFileArgument arg;
+      if(args.size())
         {
-        filePath = "Unknown";
+        arg.FilePath = args[0].FilePath;
+        arg.Line = args[0].Line;
+        }
+      else
+        {
+        arg.FilePath =  "Unknown";
+        arg.Line = 0;
         }
       cmOStringStream error;
       error << "Error in cmake code at\n"
-            << filePath << ":" << args[0].Line << ":\n"
+            << arg.FilePath << ":" << arg.Line << ":\n"
             << "A command failed during the invocation of macro \""
             << this->Args[0].c_str() << "\".";
       cmSystemTools::Error(error.str().c_str());



More information about the Cmake-commits mailing list