summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.h
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-18 09:27:49 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-18 09:27:49 (GMT)
commit7751966297e3b68b6c9904300f96bb57882af11a (patch)
tree54d87eba73fb853c5d66f5d68e2b36a5cea7d35d /Source/cmLocalNinjaGenerator.h
parentc3988ee871c99e31ad4d10e9033d89da902d5694 (diff)
downloadCMake-7751966297e3b68b6c9904300f96bb57882af11a.zip
CMake-7751966297e3b68b6c9904300f96bb57882af11a.tar.gz
CMake-7751966297e3b68b6c9904300f96bb57882af11a.tar.bz2
Ninja: remove 'friend' in ninja code
Diffstat (limited to 'Source/cmLocalNinjaGenerator.h')
-rw-r--r--Source/cmLocalNinjaGenerator.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index ea44b2f..20b36e8 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -45,7 +45,6 @@ public:
/// Overloaded methods. @see cmLocalGenerator::GetTargetDirectory()
virtual std::string GetTargetDirectory(cmTarget const& target) const;
-public:
const cmGlobalNinjaGenerator* GetGlobalNinjaGenerator() const;
cmGlobalNinjaGenerator* GetGlobalNinjaGenerator();
@@ -67,33 +66,8 @@ public:
std::string GetHomeRelativeOutputPath() const
{ return this->HomeRelativeOutputPath; }
-protected:
- virtual std::string ConvertToLinkReference(std::string const& lib);
- virtual std::string ConvertToIncludeReference(std::string const& path);
-
-private:
- friend class cmGlobalNinjaGenerator;
-
- // In order to access to protected member of the local generator.
- friend class cmNinjaTargetGenerator;
- friend class cmNinjaNormalTargetGenerator;
- friend class cmNinjaUtilityTargetGenerator;
-
-private:
- cmGeneratedFileStream& GetBuildFileStream() const;
- cmGeneratedFileStream& GetRulesFileStream() const;
-
- void WriteBuildFileTop();
- void WriteProjectHeader(std::ostream& os);
- void WriteNinjaFilesInclusion(std::ostream& os);
- void WriteProcessedMakefile(std::ostream& os);
-
- void SetConfigName();
-
std::string ConvertToNinjaPath(const char *path);
- struct map_to_ninja_path;
- friend struct map_to_ninja_path;
struct map_to_ninja_path {
cmLocalNinjaGenerator *LocalGenerator;
map_to_ninja_path(cmLocalNinjaGenerator *LocalGen)
@@ -102,26 +76,52 @@ private:
return LocalGenerator->ConvertToNinjaPath(path.c_str());
}
};
+
map_to_ninja_path MapToNinjaPath() {
return map_to_ninja_path(this);
}
+ void ExpandRuleVariables(std::string& string,
+ const RuleVariables& replaceValues) {
+ return cmLocalGenerator::
+ ExpandRuleVariables(string, replaceValues); }
+
+ std::string BuildCommandLine(const std::vector<std::string> &cmdLines);
+
void AppendTargetOutputs(cmTarget* target, cmNinjaDeps& outputs);
void AppendTargetDepends(cmTarget* target, cmNinjaDeps& outputs);
- void AppendCustomCommandDeps(const cmCustomCommand *cc,
- cmNinjaDeps &ninjaDeps);
- std::string BuildCommandLine(const std::vector<std::string> &cmdLines);
+ void AddCustomCommandTarget(cmCustomCommand const* cc, cmTarget* target);
void AppendCustomCommandLines(const cmCustomCommand *cc,
std::vector<std::string> &cmdLines);
+ void AppendCustomCommandDeps(const cmCustomCommand *cc,
+ cmNinjaDeps &ninjaDeps);
+
+ virtual std::string ConvertToLinkReference(std::string const& lib);
+
+
+protected:
+ virtual std::string ConvertToIncludeReference(std::string const& path);
+
+
+private:
+ cmGeneratedFileStream& GetBuildFileStream() const;
+ cmGeneratedFileStream& GetRulesFileStream() const;
+
+ void WriteBuildFileTop();
+ void WriteProjectHeader(std::ostream& os);
+ void WriteNinjaFilesInclusion(std::ostream& os);
+ void WriteProcessedMakefile(std::ostream& os);
+
+ void SetConfigName();
+
void WriteCustomCommandRule();
void WriteCustomCommandBuildStatement(cmCustomCommand const *cc,
const cmNinjaDeps& orderOnlyDeps);
- void AddCustomCommandTarget(cmCustomCommand const* cc, cmTarget* target);
void WriteCustomCommandBuildStatements();
-private:
+
std::string ConfigName;
std::string HomeRelativeOutputPath;