[Cmake-commits] [cmake-commits] hoffman committed cmDocumentation.cxx 1.70 1.71 cmDocumentation.h 1.33 1.34 cmakemain.cxx 1.83 1.84

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Aug 19 15:42:50 EDT 2008


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

Modified Files:
	cmDocumentation.cxx cmDocumentation.h cmakemain.cxx 
Log Message:
BUG: fix 6647 arguments after -E should not be parsed by CMake


Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.70
retrieving revision 1.71
diff -C 2 -d -r1.70 -r1.71
*** cmDocumentation.cxx	21 Jul 2008 21:52:51 -0000	1.70
--- cmDocumentation.cxx	19 Aug 2008 19:42:48 -0000	1.71
***************
*** 657,661 ****
  
  //----------------------------------------------------------------------------
! bool cmDocumentation::CheckOptions(int argc, const char* const* argv)
  {
    // Providing zero arguments gives usage information.
--- 657,662 ----
  
  //----------------------------------------------------------------------------
! bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
!                                    const char* exitOpt)
  {
    // Providing zero arguments gives usage information.
***************
*** 674,677 ****
--- 675,682 ----
    for(int i=1; i < argc; ++i)
      {
+     if(exitOpt && strcmp(argv[i], exitOpt) == 0)
+       {
+       return result;
+       }
      RequestedHelpItem help;
      // Check if this is a supported help option.

Index: cmDocumentation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C 2 -d -r1.33 -r1.34
*** cmDocumentation.h	4 Mar 2008 14:16:33 -0000	1.33
--- cmDocumentation.h	19 Aug 2008 19:42:48 -0000	1.34
***************
*** 46,52 ****
     * true if documentation options are found, and false otherwise.
     * When true is returned, PrintRequestedDocumentation should be
!    * called.
     */
!   bool CheckOptions(int argc, const char* const* argv);
    
    /**
--- 46,55 ----
     * true if documentation options are found, and false otherwise.
     * When true is returned, PrintRequestedDocumentation should be
!    * called.  exitOpt can be used for things like cmake -E, so that 
!    * all arguments after the -E are ignored and not searched for
!    * help arguments.
     */
!   bool CheckOptions(int argc, const char* const* argv, 
!                     const char* exitOpt =0);
    
    /**

Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.83
retrieving revision 1.84
diff -C 2 -d -r1.83 -r1.84
*** cmakemain.cxx	12 Aug 2008 11:01:44 -0000	1.83
--- cmakemain.cxx	19 Aug 2008 19:42:48 -0000	1.84
***************
*** 315,319 ****
  #ifdef CMAKE_BUILD_WITH_CMAKE
    cmDocumentation doc;
!   if(doc.CheckOptions(ac, av) || nocwd)
      { 
      // Construct and print requested documentation.
--- 315,319 ----
  #ifdef CMAKE_BUILD_WITH_CMAKE
    cmDocumentation doc;
!   if(doc.CheckOptions(ac, av, "-E") || nocwd)
      { 
      // Construct and print requested documentation.
***************
*** 417,443 ****
        command = true;
        }
!     else if (strcmp(av[i], "-N") == 0)
        {
        view_only = true;
        }
!     else if (strcmp(av[i], "-L") == 0)
        {
        list_cached = true;
        }
!     else if (strcmp(av[i], "-LA") == 0)
        {
        list_all_cached = true;
        }
!     else if (strcmp(av[i], "-LH") == 0)
        {
        list_cached = true;
        list_help = true;
        }
!     else if (strcmp(av[i], "-LAH") == 0)
        {
        list_all_cached = true;
        list_help = true;
        }
!     else if (strncmp(av[i], "-P", strlen("-P")) == 0)
        {
        if ( i == ac -1 )
--- 417,443 ----
        command = true;
        }
!     else if (!command && strcmp(av[i], "-N") == 0)
        {
        view_only = true;
        }
!     else if (!command && strcmp(av[i], "-L") == 0)
        {
        list_cached = true;
        }
!     else if (!command && strcmp(av[i], "-LA") == 0)
        {
        list_all_cached = true;
        }
!     else if (!command && strcmp(av[i], "-LH") == 0)
        {
        list_cached = true;
        list_help = true;
        }
!     else if (!command && strcmp(av[i], "-LAH") == 0)
        {
        list_all_cached = true;
        list_help = true;
        }
!     else if (!command && strncmp(av[i], "-P", strlen("-P")) == 0)
        {
        if ( i == ac -1 )
***************
*** 458,462 ****
        }
      }
- 
    if(command)
      {
--- 458,461 ----



More information about the Cmake-commits mailing list