summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-30 09:20:20 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-30 14:44:30 (GMT)
commit8a46a07c8bd2fddde5e4db797279e21a5575e213 (patch)
tree42e8e638cf21fd6592589fc1318e223c90137f0e
parent15c644437ae355ac196cfcfe1e874d8280451b43 (diff)
downloadCMake-8a46a07c8bd2fddde5e4db797279e21a5575e213.zip
CMake-8a46a07c8bd2fddde5e4db797279e21a5575e213.tar.gz
CMake-8a46a07c8bd2fddde5e4db797279e21a5575e213.tar.bz2
Ninja: Make WriteMacOSXContentBuild use cmNinjaBuild internally
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx20
-rw-r--r--Source/cmGlobalNinjaGenerator.h4
2 files changed, 10 insertions, 14 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index c362dc6..94c7659 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -307,20 +307,16 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule()
this->AddRule(rule);
}
-void cmGlobalNinjaGenerator::WriteMacOSXContentBuild(const std::string& input,
- const std::string& output)
+void cmGlobalNinjaGenerator::WriteMacOSXContentBuild(std::string input,
+ std::string output)
{
this->AddMacOSXContentRule();
-
- cmNinjaDeps outputs;
- outputs.push_back(output);
- cmNinjaDeps deps;
- deps.push_back(input);
- cmNinjaVars vars;
-
- this->WriteBuild(*this->BuildFileStream, "", "COPY_OSX_CONTENT", outputs,
- /*implicitOuts=*/cmNinjaDeps(), deps, cmNinjaDeps(),
- cmNinjaDeps(), cmNinjaVars());
+ {
+ cmNinjaBuild build("COPY_OSX_CONTENT");
+ build.Outputs.push_back(std::move(output));
+ build.ExplicitDeps.push_back(std::move(input));
+ this->WriteBuild(*this->BuildFileStream, build);
+ }
}
void cmGlobalNinjaGenerator::WriteRule(std::ostream& os,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 037c20e..7b62e38 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -141,8 +141,8 @@ public:
bool restat, const cmNinjaDeps& outputs,
const cmNinjaDeps& deps = cmNinjaDeps(),
const cmNinjaDeps& orderOnly = cmNinjaDeps());
- void WriteMacOSXContentBuild(const std::string& input,
- const std::string& output);
+
+ void WriteMacOSXContentBuild(std::string input, std::string output);
/**
* Write a rule statement to @a os.