[cmake-commits] alex committed cmMakefile.cxx 1.402 1.403

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jul 11 15:50:34 EDT 2007


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

Modified Files:
	cmMakefile.cxx 
Log Message:

ENH: change the way #cmakedefine is changed to #undef, so it is similar to
what autoconf does. This makes porting software from autoconf to cmake
easier, since it's easier to diff the resulting config headers.

Now the following
#cmakedefine HAVE_STRING_H 1
#cmakedefine HAVE_STRLCAT 1

produce:

#define HAVE_STRING_H 1
/* #undef HAVE_STRLCAT */

whereas before they produced:

#define HAVE_STRING_H 1
/* #undef HAVE_STRLCAT 1 */

Since it's commented out anyway, it's now change in behaviour.

Alex


Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -d -r1.402 -r1.403
--- cmMakefile.cxx	10 Jul 2007 17:52:09 -0000	1.402
+++ cmMakefile.cxx	11 Jul 2007 19:50:32 -0000	1.403
@@ -2379,9 +2379,8 @@
         }
       else
         {
-        cmSystemTools::ReplaceString(line, "#cmakedefine", "#undef");
-        output += "/* ";
-        output += line;
+        output += "/* #undef ";
+        output += this->cmDefineRegex.match(1);
         output += " */";
         }
       }



More information about the Cmake-commits mailing list