summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-07-24 21:03:46 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-07-24 21:03:46 (GMT)
commita51e1529e79ef46c8f7f346328c788a4e630e474 (patch)
tree7fed8476e05fe1278f09a130cdf2080c12762c42 /Source/cmGlobalNinjaGenerator.cxx
parentc1bbdbff57651a24fd8d7d5abe67dd24e7e6ed27 (diff)
parent1fc8df9ca22c23f42afa94a949918cda008b07ce (diff)
downloadCMake-a51e1529e79ef46c8f7f346328c788a4e630e474.zip
CMake-a51e1529e79ef46c8f7f346328c788a4e630e474.tar.gz
CMake-a51e1529e79ef46c8f7f346328c788a4e630e474.tar.bz2
Merge topic 'ninja-fix-macosx'
1fc8df9 Add missing this->. 7a3ecf5 Fix memory leak in Makefile generator. 9f7dc83 Ninja: also bootstrap ninja files 5d365b2 Ninja: enable ninja support everywhere d569f3e Ninja: void function can't return a value 52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later 56aeac6 Ninja: fixes for bcc 7a6bc9e Ninja: remove 'this' from member initializer list 44ba4cf Ninja: remove warnings 7751966 Ninja: remove 'friend' in ninja code c3988ee Re-factor OS X content generator start up. f8e0a51 Re-factor framework directory computation. f36c7b0 Re-factor Mac OS X content directory computation. 5d885db Re-factor bundle content copying rules generation. 3b2a01e Ninja: Use same echo message as makefiles. 7bb56c5 Re-factor CFBundle generation. ...
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx47
1 files changed, 47 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 912e53e..3f3cfbb 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -252,6 +252,48 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
vars);
}
+void
+cmGlobalNinjaGenerator::AddMacOSXContentRule()
+{
+ cmLocalGenerator *lg = this->LocalGenerators[0];
+ cmMakefile* mfRoot = lg->GetMakefile();
+
+ cmOStringStream cmd;
+ cmd << lg->ConvertToOutputFormat(
+ mfRoot->GetRequiredDefinition("CMAKE_COMMAND"),
+ cmLocalGenerator::SHELL)
+ << " -E copy $in $out";
+
+ this->AddRule("COPY_OSX_CONTENT",
+ cmd.str(),
+ "Copying OS X Content $out",
+ "Rule for copying OS X bundle content file."
+ /*depfile*/ "",
+ /*rspfile*/ "");
+}
+
+void
+cmGlobalNinjaGenerator::WriteMacOSXContentBuild(const std::string& input,
+ const std::string& output)
+{
+ this->AddMacOSXContentRule();
+
+ cmNinjaDeps outputs;
+ outputs.push_back(output);
+ cmNinjaDeps deps;
+ deps.push_back(input);
+ cmNinjaVars vars;
+
+ cmGlobalNinjaGenerator::WriteBuild(*this->BuildFileStream,
+ "",
+ "COPY_OSX_CONTENT",
+ outputs,
+ deps,
+ cmNinjaDeps(),
+ cmNinjaDeps(),
+ cmNinjaVars());
+}
+
void cmGlobalNinjaGenerator::WriteRule(std::ostream& os,
const std::string& name,
const std::string& command,
@@ -781,6 +823,11 @@ void cmGlobalNinjaGenerator::AddDependencyToAll(cmTarget* target)
this->AppendTargetOutputs(target, this->AllDependencies);
}
+void cmGlobalNinjaGenerator::AddDependencyToAll(const std::string& input)
+{
+ this->AllDependencies.push_back(input);
+}
+
void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies()
{
for (std::map<std::string, std::set<std::string> >::iterator