[Cmake-commits] [cmake-commits] king committed cmLocalVisualStudio6Generator.cxx 1.150 1.151 cmMakefile.cxx 1.506 1.507 cmSourceFile.cxx 1.55 1.56 cmTarget.cxx 1.236 1.237

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 23 14:48:11 EDT 2009


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

Modified Files:
	cmLocalVisualStudio6Generator.cxx cmMakefile.cxx 
	cmSourceFile.cxx cmTarget.cxx 
Log Message:
ENH: Support preprocessor def values in VS6

The add_definitions() command and COMPILE_DEFINITIONS dir/tgt/src
properties support preprocessor definitions with values.  Previously
values were not supported in the VS6 generator even though the native
tool supports them.  It is only values with spaces that VS6 does not
support.  This enables support and instead complains only for values
with spaces.  See issue #8779.


Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.55
retrieving revision 1.56
diff -C 2 -d -r1.55 -r1.56
*** cmSourceFile.cxx	16 Mar 2009 18:30:24 -0000	1.55
--- cmSourceFile.cxx	23 Mar 2009 18:48:09 -0000	1.56
***************
*** 406,410 ****
       "CMake will automatically drop some definitions that "
       "are not supported by the native build tool.  "
!      "The VS6 IDE does not support definitions with values "
       "(but NMake does).  Xcode does not support per-configuration "
       "definitions on source files.\n"
--- 406,410 ----
       "CMake will automatically drop some definitions that "
       "are not supported by the native build tool.  "
!      "The VS6 IDE does not support definition values with spaces "
       "(but NMake does).  Xcode does not support per-configuration "
       "definitions on source files.\n"

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.150
retrieving revision 1.151
diff -C 2 -d -r1.150 -r1.151
*** cmLocalVisualStudio6Generator.cxx	16 Dec 2008 14:14:40 -0000	1.150
--- cmLocalVisualStudio6Generator.cxx	23 Mar 2009 18:48:09 -0000	1.151
***************
*** 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 definitions "
!       << "with values.\n"
        << "CMake is dropping a preprocessor definition: " << define << "\n"
        << "Consider defining the macro in a (configured) header file.\n";
--- 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";

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.236
retrieving revision 1.237
diff -C 2 -d -r1.236 -r1.237
*** cmTarget.cxx	19 Mar 2009 14:53:51 -0000	1.236
--- cmTarget.cxx	23 Mar 2009 18:48:09 -0000	1.237
***************
*** 109,113 ****
       "CMake will automatically drop some definitions that "
       "are not supported by the native build tool.  "
!      "The VS6 IDE does not support definitions with values "
       "(but NMake does).\n"
       "Dislaimer: Most native build tools have poor support for escaping "
--- 109,113 ----
       "CMake will automatically drop some definitions that "
       "are not supported by the native build tool.  "
!      "The VS6 IDE does not support definition values with spaces "
       "(but NMake does).\n"
       "Dislaimer: Most native build tools have poor support for escaping "

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.506
retrieving revision 1.507
diff -C 2 -d -r1.506 -r1.507
*** cmMakefile.cxx	16 Mar 2009 14:40:26 -0000	1.506
--- cmMakefile.cxx	23 Mar 2009 18:48:09 -0000	1.507
***************
*** 1217,1224 ****
      }
  
!   // VS6 IDE does not support definitions with values.
    if((strcmp(this->LocalGenerator->GetGlobalGenerator()->GetName(),
               "Visual Studio 6") == 0) &&
!      (def.find("=") != def.npos))
      {
      return false;
--- 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;
***************
*** 3476,3480 ****
       "CMake will automatically drop some definitions that "
       "are not supported by the native build tool.  "
!      "The VS6 IDE does not support definitions with values "
       "(but NMake does).\n"
       "Dislaimer: Most native build tools have poor support for escaping "
--- 3476,3480 ----
       "CMake will automatically drop some definitions that "
       "are not supported by the native build tool.  "
!      "The VS6 IDE does not support definition values with spaces "
       "(but NMake does).\n"
       "Dislaimer: Most native build tools have poor support for escaping "



More information about the Cmake-commits mailing list