summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 3545f1e..0410b91 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -208,12 +208,23 @@ public:
}
const char* GetCleanTargetName() const override { return "clean"; }
+ virtual cmGeneratedFileStream* GetImplFileStream(
+ const std::string& /*config*/) const
+ {
+ return this->BuildFileStream.get();
+ }
+
virtual cmGeneratedFileStream* GetConfigFileStream(
const std::string& /*config*/) const
{
return this->BuildFileStream.get();
}
+ virtual cmGeneratedFileStream* GetDefaultFileStream() const
+ {
+ return this->BuildFileStream.get();
+ }
+
virtual cmGeneratedFileStream* GetCommonFileStream() const
{
return this->BuildFileStream.get();
@@ -397,6 +408,8 @@ public:
bool EnableCrossConfigBuild() const;
+ virtual const char* GetDefaultBuildType() const { return nullptr; }
+
protected:
void Generate() override;
@@ -404,7 +417,6 @@ protected:
virtual bool OpenBuildFileStreams();
virtual void CloseBuildFileStreams();
- virtual bool WriteDefaultBuildFile() { return true; }
bool OpenFileStream(std::unique_ptr<cmGeneratedFileStream>& stream,
const std::string& name);
@@ -573,12 +585,23 @@ public:
std::string ExpandCFGIntDir(const std::string& str,
const std::string& config) const override;
+ cmGeneratedFileStream* GetImplFileStream(
+ const std::string& config) const override
+ {
+ return this->ImplFileStreams.at(config).get();
+ }
+
cmGeneratedFileStream* GetConfigFileStream(
const std::string& config) const override
{
return this->ConfigFileStreams.at(config).get();
}
+ cmGeneratedFileStream* GetDefaultFileStream() const override
+ {
+ return this->DefaultFileStream.get();
+ }
+
cmGeneratedFileStream* GetCommonFileStream() const override
{
return this->CommonFileStream.get();
@@ -587,13 +610,14 @@ public:
void AppendNinjaFileArgument(GeneratedMakeCommand& command,
const std::string& config) const override;
- static std::string GetNinjaFilename(const std::string& config);
+ static std::string GetNinjaImplFilename(const std::string& config);
+ static std::string GetNinjaConfigFilename(const std::string& config);
void AddRebuildManifestOutputs(cmNinjaDeps& outputs) const override;
void GetQtAutoGenConfigs(std::vector<std::string>& configs) const override;
- bool WriteDefaultBuildFile() override;
+ const char* GetDefaultBuildType() const override;
protected:
bool OpenBuildFileStreams() override;
@@ -601,8 +625,11 @@ protected:
private:
std::map<std::string, std::unique_ptr<cmGeneratedFileStream>>
+ ImplFileStreams;
+ std::map<std::string, std::unique_ptr<cmGeneratedFileStream>>
ConfigFileStreams;
std::unique_ptr<cmGeneratedFileStream> CommonFileStream;
+ std::unique_ptr<cmGeneratedFileStream> DefaultFileStream;
};
#endif // ! cmGlobalNinjaGenerator_h