summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallFilesGenerator.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmInstallFilesGenerator.cxx
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
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/cmInstallFilesGenerator.cxx')
-rw-r--r--Source/cmInstallFilesGenerator.cxx99
1 files changed, 39 insertions, 60 deletions
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index a61c38e..a2cfc5a 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -16,44 +16,35 @@
#include "cmMakefile.h"
#include "cmSystemTools.h"
-cmInstallFilesGenerator
-::cmInstallFilesGenerator(std::vector<std::string> const& files,
- const char* dest, bool programs,
- const char* file_permissions,
- std::vector<std::string> const& configurations,
- const char* component,
- MessageLevel message,
- bool exclude_from_all,
- const char* rename,
- bool optional):
- cmInstallGenerator(dest, configurations, component, message,
- exclude_from_all),
- LocalGenerator(0),
- Files(files),
- FilePermissions(file_permissions),
- Rename(rename),
- Programs(programs),
- Optional(optional)
+cmInstallFilesGenerator::cmInstallFilesGenerator(
+ std::vector<std::string> const& files, const char* dest, bool programs,
+ const char* file_permissions, std::vector<std::string> const& configurations,
+ const char* component, MessageLevel message, bool exclude_from_all,
+ const char* rename, bool optional)
+ : cmInstallGenerator(dest, configurations, component, message,
+ exclude_from_all)
+ , LocalGenerator(0)
+ , Files(files)
+ , FilePermissions(file_permissions)
+ , Rename(rename)
+ , Programs(programs)
+ , Optional(optional)
{
// We need per-config actions if the destination has generator expressions.
- if(cmGeneratorExpression::Find(Destination) != std::string::npos)
- {
+ if (cmGeneratorExpression::Find(Destination) != std::string::npos) {
this->ActionsPerConfig = true;
- }
+ }
// We need per-config actions if any files have generator expressions.
- for(std::vector<std::string>::const_iterator i = files.begin();
- !this->ActionsPerConfig && i != files.end(); ++i)
- {
- if(cmGeneratorExpression::Find(*i) != std::string::npos)
- {
+ for (std::vector<std::string>::const_iterator i = files.begin();
+ !this->ActionsPerConfig && i != files.end(); ++i) {
+ if (cmGeneratorExpression::Find(*i) != std::string::npos) {
this->ActionsPerConfig = true;
- }
}
+ }
}
-cmInstallFilesGenerator
-::~cmInstallFilesGenerator()
+cmInstallFilesGenerator::~cmInstallFilesGenerator()
{
}
@@ -62,58 +53,46 @@ void cmInstallFilesGenerator::Compute(cmLocalGenerator* lg)
this->LocalGenerator = lg;
}
-std::string
-cmInstallFilesGenerator::GetDestination(std::string const& config) const
+std::string cmInstallFilesGenerator::GetDestination(
+ std::string const& config) const
{
cmGeneratorExpression ge;
- return ge.Parse(this->Destination)
- ->Evaluate(this->LocalGenerator, config);
+ return ge.Parse(this->Destination)->Evaluate(this->LocalGenerator, config);
}
void cmInstallFilesGenerator::AddFilesInstallRule(
- std::ostream& os,
- const std::string config,
- Indent const& indent,
+ std::ostream& os, const std::string config, Indent const& indent,
std::vector<std::string> const& files)
{
// Write code to install the files.
const char* no_dir_permissions = 0;
- this->AddInstallRule(os,
- this->GetDestination(config),
- (this->Programs
- ? cmInstallType_PROGRAMS
- : cmInstallType_FILES),
- files,
- this->Optional,
- this->FilePermissions.c_str(), no_dir_permissions,
- this->Rename.c_str(), 0, indent);
+ this->AddInstallRule(
+ os, this->GetDestination(config),
+ (this->Programs ? cmInstallType_PROGRAMS : cmInstallType_FILES), files,
+ this->Optional, this->FilePermissions.c_str(), no_dir_permissions,
+ this->Rename.c_str(), 0, indent);
}
void cmInstallFilesGenerator::GenerateScriptActions(std::ostream& os,
Indent const& indent)
{
- if(this->ActionsPerConfig)
- {
+ if (this->ActionsPerConfig) {
this->cmInstallGenerator::GenerateScriptActions(os, indent);
- }
- else
- {
+ } else {
this->AddFilesInstallRule(os, "", indent, this->Files);
- }
+ }
}
-void cmInstallFilesGenerator::GenerateScriptForConfig(std::ostream& os,
- const std::string& config,
- Indent const& indent)
+void cmInstallFilesGenerator::GenerateScriptForConfig(
+ std::ostream& os, const std::string& config, Indent const& indent)
{
std::vector<std::string> files;
cmGeneratorExpression ge;
- for(std::vector<std::string>::const_iterator i = this->Files.begin();
- i != this->Files.end(); ++i)
- {
+ for (std::vector<std::string>::const_iterator i = this->Files.begin();
+ i != this->Files.end(); ++i) {
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
- cmSystemTools::ExpandListArgument(cge->Evaluate(
- this->LocalGenerator, config), files);
- }
+ cmSystemTools::ExpandListArgument(
+ cge->Evaluate(this->LocalGenerator, config), files);
+ }
this->AddFilesInstallRule(os, config, indent, files);
}