diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fae8ad914..86d0e2eee 100644 --- a/Source/cmMakefile.cxx +++ b/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 += " */"; } }