summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2012-11-19 14:48:33 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-19 17:54:30 (GMT)
commite8f841473bcefc618ddf6712567e624156e88399 (patch)
tree2c77a631bcf9ee7c0cf731354db30c87a1cae312 /Source/cmGlobalXCodeGenerator.cxx
parent3359d95c00c221328d284e443c1d49e12630be63 (diff)
downloadCMake-e8f841473bcefc618ddf6712567e624156e88399.zip
CMake-e8f841473bcefc618ddf6712567e624156e88399.tar.gz
CMake-e8f841473bcefc618ddf6712567e624156e88399.tar.bz2
Introduce the abstract class cmGlobalGeneratorFactory
This new abstract class allows us move some logic from the cmGlobalGenerator into its own layer in a next step.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 5b2ddd8..4b07a36 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -20,6 +20,7 @@
#include "cmSourceFile.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratorTarget.h"
+#include "cmGlobalGeneratorFactory.h"
#include <cmsys/auto_ptr.hxx>
@@ -112,6 +113,15 @@ public:
}
};
+class cmGlobalXCodeGenerator::Factory : public cmGlobalGeneratorFactory
+{
+public:
+ virtual cmGlobalGenerator* CreateGlobalGenerator() const;
+
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const {
+ cmGlobalXCodeGenerator().GetDocumentation(entry); }
+};
+
//----------------------------------------------------------------------------
cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version)
{
@@ -132,7 +142,14 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version)
}
//----------------------------------------------------------------------------
-cmGlobalGenerator* cmGlobalXCodeGenerator::New()
+cmGlobalGeneratorFactory* cmGlobalXCodeGenerator::NewFactory()
+{
+ return new Factory;
+}
+
+//----------------------------------------------------------------------------
+cmGlobalGenerator* cmGlobalXCodeGenerator::Factory
+::CreateGlobalGenerator() const
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
cmXcodeVersionParser parser;