[Cmake-commits] CMake branch, next, updated. v3.0.0-4438-g31f74a7
Brad King
brad.king at kitware.com
Tue Jul 22 15:12:23 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 31f74a71b7ddb9de0829ed717a83422a23aaeb76 (commit)
via f5c0efdbe4d67a6f262dd670923674b003af1726 (commit)
from 6e0dc626547efdd9092218de263c40bbf9e12515 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31f74a71b7ddb9de0829ed717a83422a23aaeb76
commit 31f74a71b7ddb9de0829ed717a83422a23aaeb76
Merge: 6e0dc62 f5c0efd
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 22 15:12:22 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 22 15:12:22 2014 -0400
Merge topic 'refactor-generator-startup' into next
f5c0efdb cmGlobalGenerator: Create a non-virtual 'DoGenerate' method
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5c0efdbe4d67a6f262dd670923674b003af1726
commit f5c0efdbe4d67a6f262dd670923674b003af1726
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 22 15:01:05 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jul 22 15:05:36 2014 -0400
cmGlobalGenerator: Create a non-virtual 'DoGenerate' method
Make the virtual 'Generate' method protected. Make 'DoGenerate'
the main entry point to generation. This gives cmGlobalGenerator
a chance to do some early operations before the individual
generator-specific implementations take over.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6d737b1..ae6861e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1153,7 +1153,7 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
return false;
}
-void cmGlobalGenerator::Generate()
+void cmGlobalGenerator::DoGenerate()
{
// Some generators track files replaced during the Generate.
// Start with an empty vector:
@@ -1162,6 +1162,11 @@ void cmGlobalGenerator::Generate()
// clear targets to issue warning CMP0042 for
this->CMP0042WarnTargets.clear();
+ this->Generate();
+}
+
+void cmGlobalGenerator::Generate()
+{
// Check whether this generator is allowed to run.
if(!this->CheckALLOW_DUPLICATE_CUSTOM_TARGETS())
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ee3f269..6b608bb 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -80,7 +80,7 @@ public:
* basically creates a series of LocalGenerators for each directory and
* requests that they Generate.
*/
- virtual void Generate();
+ void DoGenerate();
/**
* Set/Get and Clear the enabled languages.
@@ -338,6 +338,8 @@ public:
bool GenerateCPackPropertiesFile();
protected:
+ virtual void Generate();
+
typedef std::vector<cmLocalGenerator*> GeneratorVector;
// for a project collect all its targets by following depend
// information, and also collect all the targets
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ff110d7..4cbbeea 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -182,9 +182,6 @@ public:
/// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
static void GetDocumentation(cmDocumentationEntry& entry);
- /// Overloaded methods. @see cmGlobalGenerator::Generate()
- virtual void Generate();
-
/// Overloaded methods. @see cmGlobalGenerator::EnableLanguage()
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile* mf,
@@ -302,6 +299,9 @@ public:
virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
protected:
+ /// Overloaded methods. @see cmGlobalGenerator::Generate()
+ virtual void Generate();
+
/// Overloaded methods.
/// @see cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS()
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; }
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index cb639dd..9f154e9 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -47,8 +47,6 @@ public:
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
- virtual void Generate();
-
/**
* Try to determine system infomation such as shared library
* extension, pthreads, byte order etc.
@@ -93,6 +91,8 @@ public:
virtual void FindMakeProgram(cmMakefile*);
protected:
+ virtual void Generate();
+
virtual const char* GetIDEVersion() { return "10.0"; }
std::string const& GetMSBuildCommand();
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index b2fd28f..57c2660 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -64,13 +64,6 @@ public:
);
/**
- * Generate the all required files for building this project/tree. This
- * basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
- */
- virtual void Generate();
-
- /**
* Generate the DSW workspace file.
*/
virtual void OutputDSWFile();
@@ -94,6 +87,7 @@ public:
virtual bool IsForVS6() const { return true; }
protected:
+ virtual void Generate();
virtual const char* GetIDEVersion() { return "6.0"; }
private:
virtual std::string GetVSMakeProgram() { return this->GetMSDevCommand(); }
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index bd84433..390b97c 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -72,13 +72,6 @@ public:
);
/**
- * Generate the all required files for building this project/tree. This
- * basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
- */
- virtual void Generate();
-
- /**
* Generate the DSW workspace file.
*/
virtual void OutputSLNFile();
@@ -113,6 +106,7 @@ public:
virtual std::string Encoding();
protected:
+ virtual void Generate();
virtual const char* GetIDEVersion() { return "7.0"; }
std::string const& GetDevEnvCommand();
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index aea2f01..d7e1f3a 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -45,7 +45,6 @@ public:
* target.
*/
virtual void Configure();
- virtual void Generate();
/**
* Where does this version of Visual Studio look for macros for the
@@ -69,6 +68,7 @@ public:
return !this->WindowsCEVersion.empty(); }
protected:
+ virtual void Generate();
virtual const char* GetIDEVersion() { return "8.0"; }
virtual std::string FindDevEnvCommand();
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 05dbb11..356f4d4 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -27,11 +27,6 @@ public:
virtual ~cmGlobalVisualStudioGenerator();
/**
- * Basic generate implementation for all VS generators.
- */
- virtual void Generate();
-
- /**
* Configure CMake's Visual Studio macros file into the user's Visual
* Studio macros directory.
*/
@@ -90,6 +85,8 @@ public:
void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
protected:
+ virtual void Generate();
+
// Does this VS version link targets to each other if there are
// dependencies in the SLN file? This was done for VS versions
// below 8.
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ae23e3b..fcdd349 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -64,13 +64,6 @@ public:
std::vector<std::string> const& makeOptions = std::vector<std::string>()
);
- /**
- * Generate the all required files for building this project/tree. This
- * basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
- */
- virtual void Generate();
-
/** Append the subdirectory for the given configuration. */
virtual void AppendDirectoryForConfig(const std::string& prefix,
const std::string& config,
@@ -91,6 +84,8 @@ public:
virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf);
void AppendFlag(std::string& flags, std::string const& flag);
+protected:
+ virtual void Generate();
private:
cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,
cmSourceGroup* sg);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a051c87..5aa1ab0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1715,7 +1715,7 @@ int cmake::Generate()
{
return -1;
}
- this->GlobalGenerator->Generate();
+ this->GlobalGenerator->DoGenerate();
if ( !this->GraphVizFile.empty() )
{
std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalGenerator.cxx | 7 ++++++-
Source/cmGlobalGenerator.h | 4 +++-
Source/cmGlobalNinjaGenerator.h | 6 +++---
Source/cmGlobalVisualStudio10Generator.h | 4 ++--
Source/cmGlobalVisualStudio6Generator.h | 8 +-------
Source/cmGlobalVisualStudio7Generator.h | 8 +-------
Source/cmGlobalVisualStudio8Generator.h | 2 +-
Source/cmGlobalVisualStudioGenerator.h | 7 ++-----
Source/cmGlobalXCodeGenerator.h | 9 ++-------
Source/cmake.cxx | 2 +-
10 files changed, 22 insertions(+), 35 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list