diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-23 17:39:53 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2022-11-17 12:37:11 (GMT) |
commit | 74b735dea8e2255c53f12afea5706ad443d64785 (patch) | |
tree | 03933961bcaf525b00f2a27a3bc018fed503c40b /Source/ctest.cxx | |
parent | 807aa8e35382ab55120ccb1e6ae88523ad7ee5a3 (diff) | |
download | CMake-74b735dea8e2255c53f12afea5706ad443d64785.zip CMake-74b735dea8e2255c53f12afea5706ad443d64785.tar.gz CMake-74b735dea8e2255c53f12afea5706ad443d64785.tar.bz2 |
cmDocumentation: `char*[][2]` → `cmDocumentationEntry[N]`
Use fixed size arrays of `cmDocumentationEntry` items instead of
open arrays of two `char` pointers when describe program options
help screens.
Also, drop `const char*[][2]` overloads of methods of
`cmDocumentation` and `cmDocumentationSection` classes in the sake
of generic (template) appenders introduced earlier.
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r-- | Source/ctest.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 9e632df..d26a0d7 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -11,21 +11,21 @@ #include "cmCTest.h" #include "cmConsoleBuf.h" #include "cmDocumentation.h" +#include "cmDocumentationEntry.h" #include "cmSystemTools.h" #include "CTest/cmCTestLaunch.h" #include "CTest/cmCTestScriptHandler.h" namespace { -const char* cmDocumentationName[][2] = { - { nullptr, " ctest - Testing driver provided by CMake." }, - { nullptr, nullptr } +const cmDocumentationEntry cmDocumentationName = { + nullptr, " ctest - Testing driver provided by CMake." }; -const char* cmDocumentationUsage[][2] = { { nullptr, " ctest [options]" }, - { nullptr, nullptr } }; +const cmDocumentationEntry cmDocumentationUsage = { nullptr, + " ctest [options]" }; -const char* cmDocumentationOptions[][2] = { +const cmDocumentationEntry cmDocumentationOptions[74] = { { "--preset <preset>, --preset=<preset>", "Read arguments from a test preset." }, { "--list-presets", "List available test presets." }, @@ -155,8 +155,7 @@ const char* cmDocumentationOptions[][2] = { { "--no-compress-output", "Do not compress test output when submitting." }, { "--print-labels", "Print all available test labels." }, { "--no-tests=<[error|ignore]>", - "Regard no tests found either as 'error' or 'ignore' it." }, - { nullptr, nullptr } + "Regard no tests found either as 'error' or 'ignore' it." } }; } // anonymous namespace |