diff options
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 20 |
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()); |