summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorArtur Ryt <artur.ryt@gmail.com>2018-11-30 18:00:57 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-18 17:57:32 (GMT)
commit7408cd39298dfce442d7aa539a90a227433865d5 (patch)
tree1910148c8048133dc1ff4c557d070c17940cbe9b /Source/cmakemain.cxx
parenta61c061b6143cb6d8920b1b5796a867c0f104556 (diff)
downloadCMake-7408cd39298dfce442d7aa539a90a227433865d5.zip
CMake-7408cd39298dfce442d7aa539a90a227433865d5.tar.gz
CMake-7408cd39298dfce442d7aa539a90a227433865d5.tar.bz2
cmake: Return generator docs directly
The GetGeneratorDocumentation() function was not accurately named and required the vector to populate to be passed as a function argument. This commit makes the slightly renamed function return by value, making it a true getter as implied by its name. Some minor refactoring of the implementation also makes the steps of populating the vector clearer.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 84d1414..c1c9537 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -2,7 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAlgorithms.h"
-#include "cmDocumentationEntry.h"
+#include "cmDocumentationEntry.h" // IWYU pragma: keep
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
@@ -227,9 +227,7 @@ int do_cmake(int ac, char const* const* av)
std::vector<std::string> args(av, av + ac);
hcm.SetCacheArgs(args);
- std::vector<cmDocumentationEntry> generators;
-
- hcm.GetGeneratorDocumentation(generators);
+ auto generators = hcm.GetGeneratorsDocumentation();
doc.SetName("cmake");
doc.SetSection("Name", cmDocumentationName);