[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5358-g92908ca

Brad King brad.king at kitware.com
Tue Nov 19 11:06:08 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  92908ca87cf4b66afb637bcb3a05612b3ee84fd7 (commit)
       via  e7434d43abed59e52b068da1a9f5086ccadd998c (commit)
      from  6b52071347ab1fddfa1c0cbba9d551bc90e9fedc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92908ca87cf4b66afb637bcb3a05612b3ee84fd7
commit 92908ca87cf4b66afb637bcb3a05612b3ee84fd7
Merge: 6b52071 e7434d4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 19 11:06:06 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 19 11:06:06 2013 -0500

    Merge topic 'fix-help-format-warning-exit' into next
    
    e7434d4 cmDocumentation: Fix exit after help output format warnings


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7434d43abed59e52b068da1a9f5086ccadd998c
commit e7434d43abed59e52b068da1a9f5086ccadd998c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 19 10:58:16 2013 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 19 10:58:16 2013 -0500

    cmDocumentation: Fix exit after help output format warnings
    
    After warning that a help output format is no longer supported, fix the
    return value from cmDocumentation::CheckOptions to indicate that it was
    still a help option that was parsed.  Otherwise CMake moves on to treat
    the help output file name as a source tree and complains that it does
    not exist.

diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 8029577..8e06a1c 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -195,24 +195,27 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
 
 
 void cmDocumentation::WarnFormFromFilename(
-  cmDocumentation::RequestedHelpItem& request)
+  cmDocumentation::RequestedHelpItem& request, bool& result)
 {
   std::string ext = cmSystemTools::GetFilenameLastExtension(request.Filename);
   ext = cmSystemTools::UpperCase(ext);
   if ((ext == ".HTM") || (ext == ".HTML"))
     {
     request.HelpType = cmDocumentation::None;
+    result = true;
     cmSystemTools::Message("Warning: HTML help format no longer supported");
     }
   else if (ext == ".DOCBOOK")
     {
     request.HelpType = cmDocumentation::None;
+    result = true;
     cmSystemTools::Message("Warning: Docbook help format no longer supported");
     }
   // ".1" to ".9" should be manpages
   else if ((ext.length()==2) && (ext[1] >='1') && (ext[1]<='9'))
     {
     request.HelpType = cmDocumentation::None;
+    result = true;
     cmSystemTools::Message("Warning: Man help format no longer supported");
     }
 }
@@ -300,28 +303,28 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
       help.HelpType = cmDocumentation::OneManual;
       help.Argument = "cmake-properties.7";
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-policies") == 0)
       {
       help.HelpType = cmDocumentation::OneManual;
       help.Argument = "cmake-policies.7";
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-variables") == 0)
       {
       help.HelpType = cmDocumentation::OneManual;
       help.Argument = "cmake-variables.7";
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-modules") == 0)
       {
       help.HelpType = cmDocumentation::OneManual;
       help.Argument = "cmake-modules.7";
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-custom-modules") == 0)
       {
@@ -335,7 +338,7 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
       help.HelpType = cmDocumentation::OneManual;
       help.Argument = "cmake-commands.7";
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-compatcommands") == 0)
       {
@@ -368,42 +371,42 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
       GET_OPT_ARGUMENT(help.Argument);
       GET_OPT_ARGUMENT(help.Filename);
       help.Argument = cmSystemTools::LowerCase(help.Argument);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-module") == 0)
       {
       help.HelpType = cmDocumentation::OneModule;
       GET_OPT_ARGUMENT(help.Argument);
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-property") == 0)
       {
       help.HelpType = cmDocumentation::OneProperty;
       GET_OPT_ARGUMENT(help.Argument);
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-policy") == 0)
       {
       help.HelpType = cmDocumentation::OnePolicy;
       GET_OPT_ARGUMENT(help.Argument);
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-variable") == 0)
       {
       help.HelpType = cmDocumentation::OneVariable;
       GET_OPT_ARGUMENT(help.Argument);
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-manual") == 0)
       {
       help.HelpType = cmDocumentation::OneManual;
       GET_OPT_ARGUMENT(help.Argument);
       GET_OPT_ARGUMENT(help.Filename);
-      this->WarnFormFromFilename(help);
+      this->WarnFormFromFilename(help, result);
       }
     else if(strcmp(argv[i], "--help-command-list") == 0)
       {
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index 209cc27..05c0442 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -137,7 +137,7 @@ private:
   std::vector<RequestedHelpItem> RequestedHelpItems;
   cmDocumentationFormatter Formatter;
 
-  static void WarnFormFromFilename(RequestedHelpItem& request);
+  static void WarnFormFromFilename(RequestedHelpItem& request, bool& result);
 };
 
 #endif

-----------------------------------------------------------------------

Summary of changes:
 Source/cmDocumentation.cxx |   27 +++++++++++++++------------
 Source/cmDocumentation.h   |    2 +-
 2 files changed, 16 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list