summaryrefslogtreecommitdiff
path: root/Source/cmMakefileUtilityTargetGenerator.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 10:34:04 -0400
committerBrad King <brad.king@kitware.com>2016-05-16 16:05:19 -0400
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmMakefileUtilityTargetGenerator.cxx
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadcmake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/cmMakefileUtilityTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileUtilityTargetGenerator.cxx57
1 files changed, 26 insertions, 31 deletions
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index 1c601c6405..697f123e42 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -17,18 +17,17 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
-cmMakefileUtilityTargetGenerator
-::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target):
- cmMakefileTargetGenerator(target)
+cmMakefileUtilityTargetGenerator::cmMakefileUtilityTargetGenerator(
+ cmGeneratorTarget* target)
+ : cmMakefileTargetGenerator(target)
{
this->CustomCommandDriver = OnUtility;
- this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
- this->ConfigName);
+ this->OSXBundleGenerator =
+ new cmOSXBundleGenerator(target, this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
-cmMakefileUtilityTargetGenerator
-::~cmMakefileUtilityTargetGenerator()
+cmMakefileUtilityTargetGenerator::~cmMakefileUtilityTargetGenerator()
{
delete this->OSXBundleGenerator;
}
@@ -37,14 +36,13 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
{
this->CreateRuleFile();
- *this->BuildFileStream
- << "# Utility rule file for "
- << this->GeneratorTarget->GetName() << ".\n\n";
+ *this->BuildFileStream << "# Utility rule file for "
+ << this->GeneratorTarget->GetName() << ".\n\n";
- if(!this->NoRuleMessages)
- {
- const char* root = (this->Makefile->IsOn("CMAKE_MAKE_INCLUDE_FROM_ROOT")?
- "$(CMAKE_BINARY_DIR)/" : "");
+ if (!this->NoRuleMessages) {
+ const char* root = (this->Makefile->IsOn("CMAKE_MAKE_INCLUDE_FROM_ROOT")
+ ? "$(CMAKE_BINARY_DIR)/"
+ : "");
// Include the progress variables for the target.
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
@@ -53,7 +51,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)
<< "\n\n";
- }
+ }
// write the custom commands for this target
this->WriteTargetBuildRules();
@@ -63,22 +61,22 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
std::vector<std::string> depends;
// Utility targets store their rules in pre- and post-build commands.
- this->LocalGenerator->AppendCustomDepends
- (depends, this->GeneratorTarget->GetPreBuildCommands());
+ this->LocalGenerator->AppendCustomDepends(
+ depends, this->GeneratorTarget->GetPreBuildCommands());
- this->LocalGenerator->AppendCustomDepends
- (depends, this->GeneratorTarget->GetPostBuildCommands());
+ this->LocalGenerator->AppendCustomDepends(
+ depends, this->GeneratorTarget->GetPostBuildCommands());
- this->LocalGenerator->AppendCustomCommands
- (commands, this->GeneratorTarget->GetPreBuildCommands(),
- this->GeneratorTarget);
+ this->LocalGenerator->AppendCustomCommands(
+ commands, this->GeneratorTarget->GetPreBuildCommands(),
+ this->GeneratorTarget);
// Depend on all custom command outputs for sources
this->DriveCustomCommands(depends);
- this->LocalGenerator->AppendCustomCommands
- (commands, this->GeneratorTarget->GetPostBuildCommands(),
- this->GeneratorTarget);
+ this->LocalGenerator->AppendCustomCommands(
+ commands, this->GeneratorTarget->GetPostBuildCommands(),
+ this->GeneratorTarget);
// Add dependencies on targets that must be built first.
this->AppendTargetDepends(depends);
@@ -89,14 +87,12 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
// If the rule is empty add the special empty rule dependency needed
// by some make tools.
- if(depends.empty() && commands.empty())
- {
+ if (depends.empty() && commands.empty()) {
std::string hack = this->GlobalGenerator->GetEmptyRuleHackDepends();
- if(!hack.empty())
- {
+ if (!hack.empty()) {
depends.push_back(hack);
- }
}
+ }
// Write the rule.
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
@@ -116,4 +112,3 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
// close the streams
this->CloseFileStreams();
}
-