summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2013-10-18 10:59:47 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2013-10-24 17:48:18 (GMT)
commiteeb4aece1cf564c10d1c4e7409907ca6c92462ed (patch)
tree33cb678cf9e8faad0027231f7714e4bd49a8fa02 /Source/cmLocalNinjaGenerator.cxx
parentdca43862f13e1481619fc3ff286662ee93d14af9 (diff)
downloadCMake-eeb4aece1cf564c10d1c4e7409907ca6c92462ed.zip
CMake-eeb4aece1cf564c10d1c4e7409907ca6c92462ed.tar.gz
CMake-eeb4aece1cf564c10d1c4e7409907ca6c92462ed.tar.bz2
Ninja: use deps = gcc/msvc feature
cmcldeps is now only used for .rc file processing
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 89b05d7..d95a213 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -48,7 +48,21 @@ void cmLocalNinjaGenerator::Generate()
this->WriteProcessedMakefile(this->GetRulesFileStream());
#endif
- this->WriteBuildFileTop();
+ // We do that only once for the top CMakeLists.txt file.
+ if(this->isRootMakefile())
+ {
+ this->WriteBuildFileTop();
+
+ const std::string showIncludesPrefix = this->GetMakefile()
+ ->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX");
+ if (!showIncludesPrefix.empty())
+ {
+ cmGlobalNinjaGenerator::WriteComment(this->GetRulesFileStream(),
+ "localized /showIncludes string");
+ this->GetRulesFileStream()
+ << "msvc_deps_prefix = " << showIncludesPrefix << "\n\n";
+ }
+ }
cmTargets& targets = this->GetMakefile()->GetTargets();
for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
@@ -163,10 +177,6 @@ bool cmLocalNinjaGenerator::isRootMakefile() const
void cmLocalNinjaGenerator::WriteBuildFileTop()
{
- // We do that only once for the top CMakeLists.txt file.
- if(!this->isRootMakefile())
- return;
-
// For the build file.
this->WriteProjectHeader(this->GetBuildFileStream());
this->WriteNinjaFilesInclusion(this->GetBuildFileStream());