[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4337-g9aca8db

Brad King brad.king at kitware.com
Wed Sep 25 16:24:26 EDT 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  9aca8db082e10e6e3bfc4cc4a1abcc1afb247479 (commit)
       via  afa2328833cdaa75a1060d6b07e52d52cf827282 (commit)
       via  f0562fbf02f97608c9e4c50a12214dd94c928ac1 (commit)
      from  2e1370e4bedf26ddb7dbf7d8176de483f0f770db (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=9aca8db082e10e6e3bfc4cc4a1abcc1afb247479
commit 9aca8db082e10e6e3bfc4cc4a1abcc1afb247479
Merge: 2e1370e afa2328
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 25 16:24:17 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 25 16:24:17 2013 -0400

    Merge topic 'concepts-help' into next
    
    afa2328 Add documentation about CMake policies.
    f0562fb Add infrastructure for documentation on CMake concepts.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afa2328833cdaa75a1060d6b07e52d52cf827282
commit afa2328833cdaa75a1060d6b07e52d52cf827282
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Sep 14 09:42:39 2013 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 25 16:20:57 2013 -0400

    Add documentation about CMake policies.

diff --git a/Source/cmDocumentConcepts.cxx b/Source/cmDocumentConcepts.cxx
index cb4a734..2c2a2ae 100644
--- a/Source/cmDocumentConcepts.cxx
+++ b/Source/cmDocumentConcepts.cxx
@@ -11,6 +11,25 @@
 ============================================================================*/
 #include "cmDocumentConcepts.h"
 
-void cmDocumentConcepts::GetDocumentation(std::vector<cmDocumentationEntry>&)
+void cmDocumentConcepts::GetDocumentation(std::vector<cmDocumentationEntry>&v)
 {
+  v.push_back(cmDocumentationEntry("policies",
+    "Policies and minimum version settings",
+    "Policies in CMake are used to preserve backward compatible behavior "
+    "across multiple releases.  When a new policy is introduced, newer CMake "
+    "versions will begin to warn about the backward compatible behavior.  It "
+    "is possible to disable the warning by explicitly requesting the OLD, or"
+    "backward compatible behavior using the cmake_policy command.  It is "
+    "also possible to request NEW, or non-backward compatible behavior for a "
+    "policy."
+    "\n"
+    "The cmake_minimum_required() command does more than report an error if "
+    "a too-old version of CMake is used to build a project.  It also sets "
+    "all policies introduced in that CMake version or earlier to NEW "
+    "behavior."
+    "\n"
+    "The CMAKE_MINIMUM_REQUIRED_VERSION variable may also be used to "
+    "determine whether to report an error on use of deprecated macros or "
+    "functions."
+  ));
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0562fbf02f97608c9e4c50a12214dd94c928ac1
commit f0562fbf02f97608c9e4c50a12214dd94c928ac1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Sep 11 13:16:25 2013 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 25 16:20:57 2013 -0400

    Add infrastructure for documentation on CMake concepts.
    
    Follow the same pattern as other documentation sections.

diff --git a/Docs/bash-completion/cmake b/Docs/bash-completion/cmake
index 59e0298..ca04b2e 100644
--- a/Docs/bash-completion/cmake
+++ b/Docs/bash-completion/cmake
@@ -134,6 +134,11 @@ _cmake()
                 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
             return
             ;;
+         --help-concept)
+            COMPREPLY=( $( compgen -W '$( cmake --help-concept-list \
+                2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
+            return
+            ;;
     esac
 
     $split && return
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 8412e3e..d5a5335 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -166,6 +166,8 @@ set(SRCS
   cmDocumentationFormatterUsage.cxx
   cmDocumentationSection.cxx
   cmDocumentCompileDefinitions.h
+  cmDocumentConcepts.h
+  cmDocumentConcepts.cxx
   cmDocumentGeneratorExpressions.h
   cmDocumentLocationUndefined.h
   cmDocumentVariables.cxx
diff --git a/Source/cmDocumentConcepts.cxx b/Source/cmDocumentConcepts.cxx
new file mode 100644
index 0000000..cb4a734
--- /dev/null
+++ b/Source/cmDocumentConcepts.cxx
@@ -0,0 +1,16 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2013 Stephen Kelly <steveire at gmail.com>
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "cmDocumentConcepts.h"
+
+void cmDocumentConcepts::GetDocumentation(std::vector<cmDocumentationEntry>&)
+{
+}
diff --git a/Source/cmDocumentConcepts.h b/Source/cmDocumentConcepts.h
new file mode 100644
index 0000000..b7f03c3
--- /dev/null
+++ b/Source/cmDocumentConcepts.h
@@ -0,0 +1,23 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2013 Stephen Kelly <steveire at gmail.com>
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#ifndef cmDocumentConcepts_h
+#define cmDocumentConcepts_h
+
+#include "cmStandardIncludes.h"
+
+class cmDocumentConcepts
+{
+public:
+  static void GetDocumentation(std::vector<cmDocumentationEntry>&);
+};
+
+#endif
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 4edacbb..8c6df7d 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -128,6 +128,14 @@ static const char *cmDocumentationGeneratorsHeader[][3] =
 };
 
 //----------------------------------------------------------------------------
+static const char *cmDocumentationConceptsHeader[][3] =
+{
+  {0,
+   "The following concepts are central to using CMake.", 0},
+  {0,0,0}
+};
+
+//----------------------------------------------------------------------------
 static const char *cmDocumentationStandardSeeAlso[][3] =
 {
   {0,
@@ -205,6 +213,8 @@ DOCUMENT_INTRO(Properties, "cmakeprops",
   "Reference of CMake properties.");
 DOCUMENT_INTRO(Variables, "cmakevars",
   "Reference of CMake variables.");
+DOCUMENT_INTRO(Concepts, "cmakeconcepts",
+  "Reference of CMake concepts.");
 DOCUMENT_INTRO(Commands, "cmakecommands",
   "Reference of available CMake commands.");
 DOCUMENT_INTRO(CompatCommands, "cmakecompat",
@@ -338,6 +348,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
       return this->PrintDocumentationSingleProperty(os);
     case cmDocumentation::SingleVariable:
       return this->PrintDocumentationSingleVariable(os);
+    case cmDocumentation::SingleConcept:
+      return this->PrintDocumentationSingleConcept(os);
     case cmDocumentation::List:
       this->PrintDocumentationList(os,"Commands");
       this->PrintDocumentationList(os,"Compatibility Commands");
@@ -371,6 +383,9 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
         this->PrintDocumentationList(os,i->c_str());
         }
       return true;
+    case cmDocumentation::ConceptList:
+      this->PrintDocumentationList(os,"Concepts");
+      return true;
     case cmDocumentation::Full:
       return this->PrintDocumentationFull(os);
     case cmDocumentation::Modules:
@@ -387,6 +402,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
       return this->PrintDocumentationCurrentCommands(os);
     case cmDocumentation::CompatCommands:
       return this->PrintDocumentationCompatCommands(os);
+    case cmDocumentation::Concepts:
+      return this->PrintDocumentationConcepts(os);
 
     case cmDocumentation::Copyright:
       return this->PrintCopyright(os);
@@ -706,6 +723,10 @@ void cmDocumentation::addCMakeStandardDocSections()
     sec->Append(cmDocumentationGeneratorsHeader);
     this->AllSections["Generators"] = sec;
 
+    sec = new cmDocumentationSection("CMake Concepts","CONCEPTS");
+    sec->Append(cmDocumentationConceptsHeader);
+    this->AllSections["Concepts"] = sec;
+
     this->PropertySections.push_back("Properties of Global Scope");
     this->PropertySections.push_back("Properties on Directories");
     this->PropertySections.push_back("Properties on Targets");
@@ -1171,6 +1192,13 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
       help.HelpForm = this->GetFormFromFilename(help.Filename,
                                                 &help.ManSection);
       }
+    else if(strcmp(argv[i], "--help-concepts") == 0)
+      {
+      help.HelpType = cmDocumentation::Concepts;
+      GET_OPT_ARGUMENT(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename,
+                                                &help.ManSection);
+      }
     else if(strcmp(argv[i], "--help-full") == 0)
       {
       help.HelpType = cmDocumentation::Full;
@@ -1232,6 +1260,14 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
       help.HelpForm = this->GetFormFromFilename(help.Filename,
                                                 &help.ManSection);
       }
+    else if(strcmp(argv[i], "--help-concept") == 0)
+      {
+      help.HelpType = cmDocumentation::SingleConcept;
+      GET_OPT_ARGUMENT(help.Argument);
+      GET_OPT_ARGUMENT(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename,
+                                                &help.ManSection);
+      }
     else if(strcmp(argv[i], "--help-command-list") == 0)
       {
       help.HelpType = cmDocumentation::List;
@@ -1256,6 +1292,12 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
       GET_OPT_ARGUMENT(help.Filename);
       help.HelpForm = cmDocumentation::TextForm;
       }
+    else if(strcmp(argv[i], "--help-concept-list") == 0)
+      {
+      help.HelpType = cmDocumentation::ConceptList;
+      GET_OPT_ARGUMENT(help.Filename);
+      help.HelpForm = cmDocumentation::TextForm;
+      }
     else if(strcmp(argv[i], "--copyright") == 0)
       {
       help.HelpType = cmDocumentation::Copyright;
@@ -1624,6 +1666,20 @@ bool cmDocumentation::PrintDocumentationSinglePolicy(std::ostream& os)
 }
 
 //----------------------------------------------------------------------------
+bool cmDocumentation::PrintDocumentationSingleConcept(std::ostream& os)
+{
+  if (this->PrintDocumentationGeneric(os,"Concepts"))
+    {
+    return true;
+    }
+
+  // Argument was not a concept.  Complain.
+  os << "Argument \"" << this->CurrentArgument.c_str()
+     << "\" to --help-concept is not a CMake concept.\n";
+  return false;
+}
+
+//----------------------------------------------------------------------------
 bool cmDocumentation::PrintDocumentationSingleVariable(std::ostream& os)
 {
   bool done = false;
@@ -1784,6 +1840,20 @@ bool cmDocumentation::PrintDocumentationVariables(std::ostream& os)
 }
 
 //----------------------------------------------------------------------------
+bool cmDocumentation::PrintDocumentationConcepts(std::ostream& os)
+{
+  this->ClearSections();
+  this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Concepts));
+  this->AddSectionToPrint("Concepts");
+  this->AddSectionToPrint("Copyright");
+  this->AddSectionToPrint("Standard See Also");
+  this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
+  this->Print(os);
+  this->CurrentFormatter->PrintFooter(os);
+  return true;
+}
+
+//----------------------------------------------------------------------------
 bool cmDocumentation::PrintDocumentationCurrentCommands(std::ostream& os)
 {
   this->ClearSections();
@@ -1849,6 +1919,8 @@ void cmDocumentation::CreateFullDocumentation()
   emitted.insert("Generators");
   this->AddSectionToPrint("Commands");
   emitted.insert("Commands");
+  this->AddSectionToPrint("Concepts");
+  emitted.insert("Concepts");
 
 
   this->AddSectionToPrint("Properties Description");
@@ -1958,6 +2030,7 @@ const char* cmDocumentation::GetDefaultDocName(Type ht) const
     CASE_DEFAULT_DOCNAME(Variables)
     CASE_DEFAULT_DOCNAME(Commands)
     CASE_DEFAULT_DOCNAME(CompatCommands)
+    CASE_DEFAULT_DOCNAME(Concepts)
     default: break;
     }
   return 0;
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index e180f60..2db8330 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -214,6 +214,7 @@ private:
   bool PrintDocumentationSingleProperty(std::ostream& os);
   bool PrintDocumentationSinglePolicy(std::ostream& os);
   bool PrintDocumentationSingleVariable(std::ostream& os);
+  bool PrintDocumentationSingleConcept(std::ostream& os);
   bool PrintDocumentationUsage(std::ostream& os);
   bool PrintDocumentationFull(std::ostream& os);
   bool PrintDocumentationModules(std::ostream& os);
@@ -221,6 +222,7 @@ private:
   bool PrintDocumentationPolicies(std::ostream& os);
   bool PrintDocumentationProperties(std::ostream& os);
   bool PrintDocumentationVariables(std::ostream& os);
+  bool PrintDocumentationConcepts(std::ostream& os);
   bool PrintDocumentationCurrentCommands(std::ostream& os);
   bool PrintDocumentationCompatCommands(std::ostream& os);
   void PrintDocumentationCommand(std::ostream& os,
diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx
index 9f01949..1aed324 100644
--- a/Source/cmDocumentationFormatter.cxx
+++ b/Source/cmDocumentationFormatter.cxx
@@ -146,6 +146,10 @@ cmDocumentationFormatter::ComputeSectionLinkPrefix(std::string const& name)
     {
     return "single_item";
     }
+  else if(name.find("Concepts") != name.npos)
+    {
+    return "concept";
+    }
   else
     {
     std::cerr
diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h
index 665b9b6..7cbcf99 100644
--- a/Source/cmDocumentationFormatter.h
+++ b/Source/cmDocumentationFormatter.h
@@ -28,7 +28,8 @@ public:
   { None, Usage, Single, SingleModule, SingleProperty, SingleVariable,
     List, ModuleList, PropertyList, VariableList,
     Full, Properties, Variables, Modules, CustomModules, Commands,
-    CompatCommands, Copyright, Version, Policies, SinglePolicy };
+    CompatCommands, Copyright, Version, Policies, SinglePolicy, Concepts,
+    SingleConcept, ConceptList };
 
   /** Forms of documentation output.  */
   enum Form { TextForm, HTMLForm, ManForm, UsageForm, DocbookForm };
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 290aff0..3245721 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -25,6 +25,7 @@
 #include "cmVersion.h"
 #include "cmTest.h"
 #include "cmDocumentationFormatterText.h"
+#include "cmDocumentConcepts.h"
 
 #if defined(CMAKE_BUILD_WITH_CMAKE)
 # include "cmGraphVizWriter.h"
@@ -2774,6 +2775,11 @@ void cmake::GetPolicyDocumentation(std::vector<cmDocumentationEntry>& v)
   this->Policies->GetDocumentation(v);
 }
 
+void cmake::GetConceptDocumentation(std::vector<cmDocumentationEntry>& v)
+{
+  cmDocumentConcepts::GetDocumentation(v);
+}
+
 void cmake::GetPropertiesDocumentation(std::map<std::string,
                                        cmDocumentationSection *>& v)
 {
diff --git a/Source/cmake.h b/Source/cmake.h
index a50c1ed..488e967 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -286,6 +286,7 @@ class cmake
                                   cmDocumentationSection *>&);
   void GetGeneratorDocumentation(std::vector<cmDocumentationEntry>&);
   void GetPolicyDocumentation(std::vector<cmDocumentationEntry>& entries);
+  void GetConceptDocumentation(std::vector<cmDocumentationEntry>&);
 
   ///! Set/Get a property of this target file
   void SetProperty(const char *prop, const char *value);
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 68d8339..0518a4e 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -235,6 +235,24 @@ static const char * cmDocumentationOptions[][3] =
    "If a file is specified, the documentation is written into and the output "
    "format is determined depending on the filename suffix. Supported are man "
    "page, HTML, DocBook and plain text."},
+  {"--help-concept concept [file]",
+   "Print help for a single concept and exit.",
+   "Full documentation specific to the given concept is displayed.  "
+   "If a file is specified, the documentation is written into and the output "
+   "format is determined depending on the filename suffix. Supported are man "
+   "page, HTML, DocBook and plain text."},
+  {"--help-concept-list [file]", "List documented concepts and exit.",
+   "The list contains all concepts for which help may be obtained by using "
+   "the --help-concept argument followed by a concept id.  If a file is "
+   "specified, the help is written into it.  "
+   "If a file is specified, the documentation is written into and the output "
+   "format is determined depending on the filename suffix. Supported are man "
+   "page, HTML, DocBook and plain text."},
+  {"--help-concepts [file]", "Print help for all concepts and exit.",
+   "Full documentation for all concepts is displayed."
+   "If a file is specified, the documentation is written into and the output "
+   "format is determined depending on the filename suffix. Supported are man "
+   "page, HTML, DocBook and plain text."},
   {0,0,0}
 };
 
@@ -249,6 +267,7 @@ static const char * cmDocumentationSeeAlso[][3] =
   {0, "cmakemodules", 0},
   {0, "cmakeprops", 0},
   {0, "cmakevars", 0},
+  {0, "cmakeconcepts", 0},
   {0, 0, 0}
 };
 
@@ -384,6 +403,7 @@ int do_cmake(int ac, char** av)
     std::vector<cmDocumentationEntry> policies;
     std::vector<cmDocumentationEntry> compatCommands;
     std::vector<cmDocumentationEntry> generators;
+    std::vector<cmDocumentationEntry> concepts;
     std::map<std::string,cmDocumentationSection *> propDocs;
 
     hcm.GetPolicyDocumentation(policies);
@@ -391,6 +411,7 @@ int do_cmake(int ac, char** av)
     hcm.GetCommandDocumentation(compatCommands, false, true);
     hcm.GetPropertiesDocumentation(propDocs);
     hcm.GetGeneratorDocumentation(generators);
+    hcm.GetConceptDocumentation(concepts);
 
     doc.SetName("cmake");
     doc.SetSection("Name",cmDocumentationName);
@@ -401,6 +422,7 @@ int do_cmake(int ac, char** av)
     doc.SetSection("Commands",commands);
     doc.SetSection("Policies",policies);
     doc.AppendSection("Compatibility Commands",compatCommands);
+    doc.AppendSection("Concepts",concepts);
     doc.SetSections(propDocs);
 
     cmDocumentationEntry e;
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index bad8d63..16df08f 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -24,6 +24,7 @@ set(MAN_FILES
   ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
   ${CMake_BINARY_DIR}/Docs/cmakevars.1
   ${CMake_BINARY_DIR}/Docs/cmakemodules.1
+  ${CMake_BINARY_DIR}/Docs/cmakeconcepts.1
   )
 set(TEXT_FILES
   ${CMake_BINARY_DIR}/Docs/cmake.txt
@@ -33,6 +34,7 @@ set(TEXT_FILES
   ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
   ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
   ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
+  ${CMake_BINARY_DIR}/Docs/cmake-concepts.txt
   )
 set(HTML_FILES
   ${CMake_BINARY_DIR}/Docs/cmake.html
@@ -42,6 +44,7 @@ set(HTML_FILES
   ${CMake_BINARY_DIR}/Docs/cmake-modules.html
   ${CMake_BINARY_DIR}/Docs/cmake-commands.html
   ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
+  ${CMake_BINARY_DIR}/Docs/cmake-concepts.html
   )
 set(DOCBOOK_FILES
   ${CMake_BINARY_DIR}/Docs/cmake.docbook
@@ -119,6 +122,9 @@ add_custom_command(
        --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
        --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
        --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmakecompat.1
+       --help-concepts ${CMake_BINARY_DIR}/Docs/cmake-concepts.txt
+       --help-concepts ${CMake_BINARY_DIR}/Docs/cmake-concepts.html
+       --help-concepts ${CMake_BINARY_DIR}/Docs/cmakeconcepts.1
   DEPENDS cmake
   MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
   )
diff --git a/bootstrap b/bootstrap
index fb4a0a0..11a1e53 100755
--- a/bootstrap
+++ b/bootstrap
@@ -254,6 +254,7 @@ CMAKE_CXX_SOURCES="\
   cmTest \
   cmCustomCommand \
   cmCustomCommandGenerator \
+  cmDocumentConcepts \
   cmDocumentVariables \
   cmCacheManager \
   cmListFileCache \

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list