summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-09 13:01:08 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-05-09 13:01:08 (GMT)
commit7ecd9648a166ecf500badfd0c4eab77a15101c35 (patch)
tree29dba5c66e0b210f846e64b64f2af21e8fcddc1e /Source/cmGlobalNinjaGenerator.cxx
parent488b82f8ccca4de8a052b94ddf2be131682561cb (diff)
parentafca373510b5303d55fde17085718323ea9b2cb9 (diff)
downloadCMake-7ecd9648a166ecf500badfd0c4eab77a15101c35.zip
CMake-7ecd9648a166ecf500badfd0c4eab77a15101c35.tar.gz
CMake-7ecd9648a166ecf500badfd0c4eab77a15101c35.tar.bz2
Merge topic 'clang-format-prep'
afca3735 Help clang-format wrap after braces on long initializer lists 85425a3e Move comments off of class access specifier lines 64b55203 Isolate formatted streaming blocks with clang-format off/on
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index a8a7262..953df6b 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -820,11 +820,13 @@ void cmGlobalNinjaGenerator::OpenRulesFileStream()
this->WriteDisclaimer(*this->RulesFileStream);
// Write comment about this file.
+ /* clang-format off */
*this->RulesFileStream
<< "# This file contains all the rules used to get the outputs files\n"
<< "# built from the input files.\n"
<< "# It is included in the main '" << NINJA_BUILD_FILE << "'.\n\n"
;
+ /* clang-format on */
}
void cmGlobalNinjaGenerator::CloseRulesFileStream()
@@ -891,6 +893,7 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
}
+ /* clang-format off */
*this->CompileCommandsStream << "\n{\n"
<< " \"directory\": \""
<< cmGlobalGenerator::EscapeJSON(buildFileDir) << "\",\n"
@@ -899,6 +902,7 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
<< " \"file\": \""
<< cmGlobalGenerator::EscapeJSON(sourceFileName) << "\"\n"
<< "}";
+ /* clang-format on */
}
void cmGlobalNinjaGenerator::CloseCompileCommandsStream()
@@ -1149,9 +1153,11 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
//dependencies that we have no rule for
cmGlobalNinjaGenerator::WriteDivider(os);
+ /* clang-format off */
os << "# Unknown Build Time Dependencies.\n"
<< "# Tell Ninja that they may appear as side effects of build rules\n"
<< "# otherwise ordered by order-only dependencies.\n\n";
+ /* clang-format on */
//get the list of files that cmake itself has generated as a
//product of configuration.
@@ -1256,6 +1262,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
if (!warnExplicitDepends.empty())
{
std::ostringstream w;
+ /* clang-format off */
w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0058) << "\n"
"This project specifies custom command DEPENDS on files "
"in the build tree that are not specified as the OUTPUT or "
@@ -1269,6 +1276,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
"Project authors should add the missing BYPRODUCTS or OUTPUT "
"options to the custom commands that produce these files."
;
+ /* clang-format on */
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
}