[Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx 1.300 1.301 cmLocalVisualStudio6Generator.cxx 1.151 1.152 cmMakefile.cxx 1.507 1.508
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Apr 24 11:18:08 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv4815/Source
Modified Files:
cmLocalGenerator.cxx cmLocalVisualStudio6Generator.cxx
cmMakefile.cxx
Log Message:
ENH: Support more preprocessor values in VS6
Previously we rejected all preprocessor definition values containing
spaces for the VS6 IDE generator. In fact VS6 does support spaces but
not in combination with '"', '$', or ';', and only if we use the sytnax
'-DNAME="value with spaces"' instead of '-D"NAME=value with spaces"'.
Now we support all definition values that do not have one of these
invalid pairs. See issue #8779.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.300
retrieving revision 1.301
diff -C 2 -d -r1.300 -r1.301
*** cmLocalGenerator.cxx 7 Apr 2009 19:13:07 -0000 1.300
--- cmLocalGenerator.cxx 24 Apr 2009 15:17:59 -0000 1.301
***************
*** 1995,2000 ****
else
{
! // Make the definition appear properly on the command line.
! defines += this->EscapeForShell(di->c_str(), true);
}
}
--- 1995,2007 ----
else
{
! // Make the definition appear properly on the command line. Use
! // -DNAME="value" instead of -D"NAME=value" to help VS6 parser.
! std::string::size_type eq = di->find("=");
! defines += di->substr(0, eq);
! if(eq != di->npos)
! {
! defines += "=";
! defines += this->EscapeForShell(di->c_str() + eq + 1, true);
! }
}
}
Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.151
retrieving revision 1.152
diff -C 2 -d -r1.151 -r1.152
*** cmLocalVisualStudio6Generator.cxx 23 Mar 2009 18:48:09 -0000 1.151
--- cmLocalVisualStudio6Generator.cxx 24 Apr 2009 15:18:03 -0000 1.152
***************
*** 1713,1721 ****
// Now do the VS6-specific check.
! if(define.find_first_of(" ") != define.npos)
{
cmOStringStream e;
e << "WARNING: The VS6 IDE does not support preprocessor definition "
! << "values with spaces.\n"
<< "CMake is dropping a preprocessor definition: " << define << "\n"
<< "Consider defining the macro in a (configured) header file.\n";
--- 1713,1722 ----
// Now do the VS6-specific check.
! if(define.find_first_of(" ") != define.npos &&
! define.find_first_of("\"$;") != define.npos)
{
cmOStringStream e;
e << "WARNING: The VS6 IDE does not support preprocessor definition "
! << "values with spaces and '\"', '$', or ';'.\n"
<< "CMake is dropping a preprocessor definition: " << define << "\n"
<< "Consider defining the macro in a (configured) header file.\n";
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.507
retrieving revision 1.508
diff -C 2 -d -r1.507 -r1.508
*** cmMakefile.cxx 23 Mar 2009 18:48:09 -0000 1.507
--- cmMakefile.cxx 24 Apr 2009 15:18:05 -0000 1.508
***************
*** 1217,1224 ****
}
! // VS6 IDE does not support definition values with spaces.
if((strcmp(this->LocalGenerator->GetGlobalGenerator()->GetName(),
"Visual Studio 6") == 0) &&
! (def.find(" ") != def.npos))
{
return false;
--- 1217,1225 ----
}
! // VS6 IDE does not support definition values with spaces in
! // combination with '"', '$', or ';'.
if((strcmp(this->LocalGenerator->GetGlobalGenerator()->GetName(),
"Visual Studio 6") == 0) &&
! (def.find(" ") != def.npos && def.find_first_of("\"$;") != def.npos))
{
return false;
More information about the Cmake-commits
mailing list