瀏覽代碼

STYLE: add "--help-policy" and "--help-policies" to the documentation
-generate and install the policy documentation files
-generate and install the docbook files for cmake, ctest, cpack, ccmake (cmake-gui not yet ?)

Alex

Alexander Neundorf 17 年之前
父節點
當前提交
9a4e1c5cff
共有 2 個文件被更改,包括 22 次插入1 次删除
  1. 11 0
      Source/cmakemain.cxx
  2. 11 1
      Utilities/CMakeLists.txt

+ 11 - 0
Source/cmakemain.cxx

@@ -144,6 +144,17 @@ static const char * cmDocumentationOptions[][3] =
    "If a file is specified, the documentation is written into and the output "
    "If a file is specified, the documentation is written into and the output "
    "format is determined depending on the filename suffix. Supported are man "
    "format is determined depending on the filename suffix. Supported are man "
    "page, HTML, DocBook and plain text."},
    "page, HTML, DocBook and plain text."},
+  {"--help-policy cmp [file]", 
+   "Print help for a single policy and exit.",
+   "Full documentation specific to the given policy 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-policies [file]", "Print help for all policies and exit.",
+   "Full documentation for all policies 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-property prop [file]", 
   {"--help-property prop [file]", 
    "Print help for a single property and exit.",
    "Print help for a single property and exit.",
    "Full documentation specific to the given property is displayed."
    "Full documentation specific to the given property is displayed."

+ 11 - 1
Utilities/CMakeLists.txt

@@ -16,6 +16,7 @@ MACRO(ADD_DOCS target dependency)
       ARGS --help-full ${CMake_BINARY_DIR}/Docs/${target}.txt
       ARGS --help-full ${CMake_BINARY_DIR}/Docs/${target}.txt
            --help-full ${CMake_BINARY_DIR}/Docs/${target}.html
            --help-full ${CMake_BINARY_DIR}/Docs/${target}.html
            --help-full ${CMake_BINARY_DIR}/Docs/${target}.1
            --help-full ${CMake_BINARY_DIR}/Docs/${target}.1
+           --help-full ${CMake_BINARY_DIR}/Docs/${target}.docbook
       DEPENDS ${target}
       DEPENDS ${target}
       MAIN_DEPENDENCY ${dependency}
       MAIN_DEPENDENCY ${dependency}
       )
       )
@@ -23,6 +24,7 @@ MACRO(ADD_DOCS target dependency)
     INSTALL_FILES(${CMAKE_DOC_DIR} FILES
     INSTALL_FILES(${CMAKE_DOC_DIR} FILES
       ${CMake_BINARY_DIR}/Docs/${target}.txt
       ${CMake_BINARY_DIR}/Docs/${target}.txt
       ${CMake_BINARY_DIR}/Docs/${target}.html
       ${CMake_BINARY_DIR}/Docs/${target}.html
+      ${CMake_BINARY_DIR}/Docs/${target}.docbook
       )
       )
     SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
     SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
   ENDIF(CMD)
   ENDIF(CMD)
@@ -44,6 +46,10 @@ ADD_CUSTOM_COMMAND(
        --help-full ${CMake_BINARY_DIR}/Docs/cmake.txt
        --help-full ${CMake_BINARY_DIR}/Docs/cmake.txt
        --help-full ${CMake_BINARY_DIR}/Docs/cmake.html
        --help-full ${CMake_BINARY_DIR}/Docs/cmake.html
        --help-full ${CMake_BINARY_DIR}/Docs/cmake.1
        --help-full ${CMake_BINARY_DIR}/Docs/cmake.1
+       --help-full ${CMake_BINARY_DIR}/Docs/cmake.docbook
+       --help-policies ${CMake_BINARY_DIR}/Docs/cmake-policies.txt
+       --help-policies ${CMake_BINARY_DIR}/Docs/cmake-policies.html
+       --help-policies ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
        --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
        --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
        --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.html
        --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.html
        --help-properties ${CMake_BINARY_DIR}/Docs/cmakeprops.1
        --help-properties ${CMake_BINARY_DIR}/Docs/cmakeprops.1
@@ -68,17 +74,21 @@ INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES
               ${CMake_BINARY_DIR}/Docs/cmakecommands.1
               ${CMake_BINARY_DIR}/Docs/cmakecommands.1
               ${CMake_BINARY_DIR}/Docs/cmakecompat.1
               ${CMake_BINARY_DIR}/Docs/cmakecompat.1
               ${CMake_BINARY_DIR}/Docs/cmakeprops.1
               ${CMake_BINARY_DIR}/Docs/cmakeprops.1
+              ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
               ${CMake_BINARY_DIR}/Docs/cmakevars.1
               ${CMake_BINARY_DIR}/Docs/cmakevars.1
               ${CMake_BINARY_DIR}/Docs/cmakemodules.1)
               ${CMake_BINARY_DIR}/Docs/cmakemodules.1)
 
 
 INSTALL_FILES(${CMAKE_DOC_DIR} FILES
 INSTALL_FILES(${CMAKE_DOC_DIR} FILES
     ${CMake_BINARY_DIR}/Docs/cmake.txt
     ${CMake_BINARY_DIR}/Docs/cmake.txt
     ${CMake_BINARY_DIR}/Docs/cmake.html
     ${CMake_BINARY_DIR}/Docs/cmake.html
+    ${CMake_BINARY_DIR}/Docs/cmake.docbook
+    ${CMake_BINARY_DIR}/Docs/cmake-policies.txt
+    ${CMake_BINARY_DIR}/Docs/cmake-policies.html
     ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
     ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
     ${CMake_BINARY_DIR}/Docs/cmake-properties.html
     ${CMake_BINARY_DIR}/Docs/cmake-properties.html
     ${CMake_BINARY_DIR}/Docs/cmake-variables.txt
     ${CMake_BINARY_DIR}/Docs/cmake-variables.txt
     ${CMake_BINARY_DIR}/Docs/cmake-variables.html 
     ${CMake_BINARY_DIR}/Docs/cmake-variables.html 
-   ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
+    ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
     ${CMake_BINARY_DIR}/Docs/cmake-modules.html
     ${CMake_BINARY_DIR}/Docs/cmake-modules.html
     ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
     ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
     ${CMake_BINARY_DIR}/Docs/cmake-commands.html
     ${CMake_BINARY_DIR}/Docs/cmake-commands.html