diff options
Diffstat (limited to 'Source/cmMakefileUtilityTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileUtilityTargetGenerator.cxx | 57 |
1 files changed, 26 insertions, 31 deletions
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 1c601c6..697f123 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(); } - |