Procházet zdrojové kódy

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

Alexander Neundorf před 18 roky
rodič
revize
ab10b43ec5
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      Source/cmMakefile.cxx

+ 2 - 3
Source/cmMakefile.cxx

@@ -2379,9 +2379,8 @@ void cmMakefile::ConfigureString(const std::string& input,
         }
       else
         {
-        cmSystemTools::ReplaceString(line, "#cmakedefine", "#undef");
-        output += "/* ";
-        output += line;
+        output += "/* #undef ";
+        output += this->cmDefineRegex.match(1);
         output += " */";
         }
       }