summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-18 10:17:39 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-18 10:17:39 (GMT)
commit44ba4cfdb6471506db37634b032cf4fa3784f4f9 (patch)
treec9230caf53978d4623932957c5d198645718e4ed
parent7751966297e3b68b6c9904300f96bb57882af11a (diff)
downloadCMake-44ba4cfdb6471506db37634b032cf4fa3784f4f9.zip
CMake-44ba4cfdb6471506db37634b032cf4fa3784f4f9.tar.gz
CMake-44ba4cfdb6471506db37634b032cf4fa3784f4f9.tar.bz2
Ninja: remove warnings
-rw-r--r--Source/cmMakefileTargetGenerator.cxx19
-rw-r--r--Source/cmMakefileTargetGenerator.h16
-rw-r--r--Source/cmNinjaTargetGenerator.cxx15
-rw-r--r--Source/cmNinjaTargetGenerator.h13
-rw-r--r--Source/cmOSXBundleGenerator.h5
5 files changed, 32 insertions, 36 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index bc016dc..0de182e 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -29,7 +29,7 @@
cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
: OSXBundleGenerator(0)
- , MacOSXContentGenerator(this)
+ , MacOSXContentGenerator(0)
{
this->BuildFileStream = 0;
this->InfoFileStream = 0;
@@ -52,6 +52,12 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
{
this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
}
+ MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
+}
+
+cmMakefileTargetGenerator::~cmMakefileTargetGenerator()
+{
+ delete MacOSXContentGenerator;
}
cmMakefileTargetGenerator *
@@ -157,10 +163,10 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
}
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
this->GeneratorTarget->HeaderSources,
- &this->MacOSXContentGenerator);
+ this->MacOSXContentGenerator);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
this->GeneratorTarget->ExtraSources,
- &this->MacOSXContentGenerator);
+ this->MacOSXContentGenerator);
for(std::vector<cmSourceFile*>::const_iterator
si = this->GeneratorTarget->ExternalObjects.begin();
si != this->GeneratorTarget->ExternalObjects.end(); ++si)
@@ -348,13 +354,6 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
}
}
-//----------------------------------------------------------------------------
-cmMakefileTargetGenerator::MacOSXContentGeneratorType::
-MacOSXContentGeneratorType(cmMakefileTargetGenerator* generator)
- : cmOSXBundleGenerator::MacOSXContentGeneratorType()
- , Generator(generator)
-{
-}
//----------------------------------------------------------------------------
void
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index d5eb634..3ea524b 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -35,7 +35,7 @@ class cmMakefileTargetGenerator
public:
// constructor to set the ivars
cmMakefileTargetGenerator(cmTarget* target);
- virtual ~cmMakefileTargetGenerator() {};
+ virtual ~cmMakefileTargetGenerator();
// construct using this factory call
static cmMakefileTargetGenerator *New(cmTarget *tgt);
@@ -74,17 +74,17 @@ protected:
void WriteTargetDependRules();
// write rules for Mac OS X Application Bundle content.
- class MacOSXContentGeneratorType
- : public cmOSXBundleGenerator::MacOSXContentGeneratorType
+ struct MacOSXContentGeneratorType :
+ cmOSXBundleGenerator::MacOSXContentGeneratorType
{
- public:
- MacOSXContentGeneratorType(cmMakefileTargetGenerator* Generator);
- virtual void operator()(cmSourceFile& source, const char* pkgloc);
+ MacOSXContentGeneratorType(cmMakefileTargetGenerator* gen) :
+ Generator(gen) {}
+
+ void operator()(cmSourceFile& source, const char* pkgloc);
private:
cmMakefileTargetGenerator* Generator;
};
- friend class MacOSXContentGeneratorType;
// write the rules for an object
void WriteObjectRuleFiles(cmSourceFile& source);
@@ -234,7 +234,7 @@ protected:
std::string MacContentDirectory;
std::set<cmStdString> MacContentFolders;
cmOSXBundleGenerator* OSXBundleGenerator;
- MacOSXContentGeneratorType MacOSXContentGenerator;
+ MacOSXContentGeneratorType* MacOSXContentGenerator;
typedef std::map<cmStdString, cmStdString> ByLanguageMap;
std::string GetFlags(const std::string &l);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index ac2b468..967507e 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -57,7 +57,7 @@ cmNinjaTargetGenerator::New(cmTarget* target)
cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmTarget* target)
:
- MacOSXContentGenerator(this),
+ MacOSXContentGenerator(0),
OSXBundleGenerator(0),
MacContentFolders(),
Target(target),
@@ -68,10 +68,12 @@ cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmTarget* target)
{
this->GeneratorTarget =
this->GetGlobalGenerator()->GetGeneratorTarget(target);
+ MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
}
cmNinjaTargetGenerator::~cmNinjaTargetGenerator()
{
+ delete MacOSXContentGenerator;
}
cmGeneratedFileStream& cmNinjaTargetGenerator::GetBuildFileStream() const
@@ -434,10 +436,10 @@ cmNinjaTargetGenerator
}
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
this->GeneratorTarget->HeaderSources,
- &this->MacOSXContentGenerator);
+ this->MacOSXContentGenerator);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
this->GeneratorTarget->ExtraSources,
- &this->MacOSXContentGenerator);
+ this->MacOSXContentGenerator);
for(std::vector<cmSourceFile*>::const_iterator
si = this->GeneratorTarget->ExternalObjects.begin();
si != this->GeneratorTarget->ExternalObjects.end(); ++si)
@@ -645,13 +647,6 @@ cmNinjaTargetGenerator
EnsureDirectoryExists(cmSystemTools::GetParentDirectory(path.c_str()));
}
-//----------------------------------------------------------------------------
-cmNinjaTargetGenerator::MacOSXContentGeneratorType::
-MacOSXContentGeneratorType(cmNinjaTargetGenerator* generator)
- : cmOSXBundleGenerator::MacOSXContentGeneratorType()
- , Generator(generator)
-{
-}
//----------------------------------------------------------------------------
void
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index a2ca4bd..fb45837 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -116,12 +116,13 @@ protected:
void EnsureParentDirectoryExists(const std::string& path);
// write rules for Mac OS X Application Bundle content.
- class MacOSXContentGeneratorType
- : public cmOSXBundleGenerator::MacOSXContentGeneratorType
+ struct MacOSXContentGeneratorType :
+ cmOSXBundleGenerator::MacOSXContentGeneratorType
{
- public:
- MacOSXContentGeneratorType(cmNinjaTargetGenerator* Generator);
- virtual void operator()(cmSourceFile& source, const char* pkgloc);
+ MacOSXContentGeneratorType(cmNinjaTargetGenerator* g) :
+ Generator(g) {}
+
+ void operator()(cmSourceFile& source, const char* pkgloc);
private:
cmNinjaTargetGenerator* Generator;
@@ -129,7 +130,7 @@ protected:
protected:
- MacOSXContentGeneratorType MacOSXContentGenerator;
+ MacOSXContentGeneratorType* MacOSXContentGenerator;
// Properly initialized by sub-classes.
cmOSXBundleGenerator* OSXBundleGenerator;
std::set<cmStdString> MacContentFolders;
diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h
index 2ed9e91..01e3cbe 100644
--- a/Source/cmOSXBundleGenerator.h
+++ b/Source/cmOSXBundleGenerator.h
@@ -35,9 +35,9 @@ public:
void CreateFramework(std::string const& targetName);
void CreateCFBundle(std::string& targetName, std::string& outpath);
- class MacOSXContentGeneratorType
+ struct MacOSXContentGeneratorType
{
- public:
+ virtual ~MacOSXContentGeneratorType() {}
virtual void operator()(cmSourceFile& source, const char* pkgloc) = 0;
};
@@ -67,4 +67,5 @@ private:
std::set<cmStdString>* MacContentFolders;
};
+
#endif