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/cmake.h | |
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/cmake.h')
-rw-r--r-- | Source/cmake.h | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index 6b585a1..325c0c5 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -18,6 +18,7 @@ #include <cm/string_view> #include <cmext/string_view> +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmInstalledFile.h" #include "cmListFileCache.h" @@ -45,7 +46,6 @@ class cmMakefile; class cmMessenger; class cmVariableWatch; struct cmBuildOptions; -struct cmDocumentationEntry; /** \brief Represents a cmake invocation. * @@ -793,37 +793,10 @@ private: #if !defined(CMAKE_BOOTSTRAP) std::unique_ptr<cmMakefileProfilingData> ProfilingOutput; #endif -}; -#define CMAKE_STANDARD_OPTIONS_TABLE \ - { "-S <path-to-source>", "Explicitly specify a source directory." }, \ - { "-B <path-to-build>", "Explicitly specify a build directory." }, \ - { "-C <initial-cache>", "Pre-load a script to populate the cache." }, \ - { "-D <var>[:<type>]=<value>", "Create or update a cmake cache entry." }, \ - { "-U <globbing_expr>", "Remove matching entries from CMake cache." }, \ - { "-G <generator-name>", "Specify a build system generator." }, \ - { "-T <toolset-name>", \ - "Specify toolset name if supported by generator." }, \ - { "-A <platform-name>", \ - "Specify platform name if supported by generator." }, \ - { "--toolchain <file>", \ - "Specify toolchain file [CMAKE_TOOLCHAIN_FILE]." }, \ - { "--install-prefix <directory>", \ - "Specify install directory [CMAKE_INSTALL_PREFIX]." }, \ - { "-Wdev", "Enable developer warnings." }, \ - { "-Wno-dev", "Suppress developer warnings." }, \ - { "-Werror=dev", "Make developer warnings errors." }, \ - { "-Wno-error=dev", "Make developer warnings not errors." }, \ - { "-Wdeprecated", "Enable deprecation warnings." }, \ - { "-Wno-deprecated", "Suppress deprecation warnings." }, \ - { "-Werror=deprecated", \ - "Make deprecated macro and function warnings " \ - "errors." }, \ - { \ - "-Wno-error=deprecated", \ - "Make deprecated macro and function warnings " \ - "not errors." \ - } +public: + static cmDocumentationEntry CMAKE_STANDARD_OPTIONS_TABLE[18]; +}; #define FOR_EACH_C90_FEATURE(F) F(c_function_prototypes) |