summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGeneratorFactory.h
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-10-26 11:09:54 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2022-11-17 12:37:13 (GMT)
commit6e3e8827faf0bf2363ecf9035b5573e715e52fb2 (patch)
tree21681997c33a843eb61cd66d76651b5a3b4f220c /Source/cmGlobalGeneratorFactory.h
parente99a4acbcd2f7ec8e5cefbf996af1dfa95e61a27 (diff)
downloadCMake-6e3e8827faf0bf2363ecf9035b5573e715e52fb2.zip
CMake-6e3e8827faf0bf2363ecf9035b5573e715e52fb2.tar.gz
CMake-6e3e8827faf0bf2363ecf9035b5573e715e52fb2.tar.bz2
Refactor: `cmGlobalGeneratorFactory::GetDocumentation` returns entry
Before, a documentation entry was in/out parameter. Now it's a normal return value. This also makes possible to eliminate defaulted default ctor for `cmDocumentationEntry` for C++ 11. Also, simplify `cmake::AppendGlobalGeneratorsDocumentation()`.
Diffstat (limited to 'Source/cmGlobalGeneratorFactory.h')
-rw-r--r--Source/cmGlobalGeneratorFactory.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h
index e8ed3e0..a935079 100644
--- a/Source/cmGlobalGeneratorFactory.h
+++ b/Source/cmGlobalGeneratorFactory.h
@@ -4,6 +4,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmDocumentationEntry.h" // IWYU pragma: export
+
+// TODO The following headers are parts of the `cmGlobalGeneratorFactory`
+// public API, so could be defined as export to IWYU
#include <string>
#include <vector>
@@ -11,7 +15,6 @@
class cmGlobalGenerator;
class cmake;
-struct cmDocumentationEntry;
/** \class cmGlobalGeneratorFactory
* \brief Responable for creating cmGlobalGenerator instances
@@ -28,7 +31,7 @@ public:
const std::string& n, bool allowArch, cmake* cm) const = 0;
/** Get the documentation entry for this factory */
- virtual void GetDocumentation(cmDocumentationEntry& entry) const = 0;
+ virtual cmDocumentationEntry GetDocumentation() const = 0;
/** Get the names of the current registered generators */
virtual std::vector<std::string> GetGeneratorNames() const = 0;
@@ -62,9 +65,9 @@ public:
}
/** Get the documentation entry for this factory */
- void GetDocumentation(cmDocumentationEntry& entry) const override
+ cmDocumentationEntry GetDocumentation() const override
{
- T::GetDocumentation(entry);
+ return T::GetDocumentation();
}
/** Get the names of the current registered generators */