summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkDirectoriesCommand.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/cmLinkDirectoriesCommand.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/cmLinkDirectoriesCommand.cxx')
-rw-r--r--Source/cmLinkDirectoriesCommand.cxx29
1 files changed, 12 insertions, 17 deletions
diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx
index b77c3be..a33b429 100644
--- a/Source/cmLinkDirectoriesCommand.cxx
+++ b/Source/cmLinkDirectoriesCommand.cxx
@@ -12,19 +12,17 @@
#include "cmLinkDirectoriesCommand.h"
// cmLinkDirectoriesCommand
-bool cmLinkDirectoriesCommand
-::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
+bool cmLinkDirectoriesCommand::InitialPass(
+ std::vector<std::string> const& args, cmExecutionStatus&)
{
- if(args.size() < 1 )
- {
+ if (args.size() < 1) {
return true;
- }
+ }
- for(std::vector<std::string>::const_iterator i = args.begin();
- i != args.end(); ++i)
- {
+ for (std::vector<std::string>::const_iterator i = args.begin();
+ i != args.end(); ++i) {
this->AddLinkDir(*i);
- }
+ }
return true;
}
@@ -32,8 +30,7 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
{
std::string unixPath = dir;
cmSystemTools::ConvertToUnixSlashes(unixPath);
- if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))
- {
+ if (!cmSystemTools::FileIsFullPath(unixPath.c_str())) {
bool convertToAbsolute = false;
std::ostringstream e;
/* clang-format off */
@@ -41,8 +38,7 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
<< " " << unixPath << "\n"
<< "as a link directory.\n";
/* clang-format on */
- switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0015))
- {
+ switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0015)) {
case cmPolicies::WARN:
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0015);
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str());
@@ -57,14 +53,13 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
// NEW behavior converts
convertToAbsolute = true;
break;
- }
- if (convertToAbsolute)
- {
+ }
+ if (convertToAbsolute) {
std::string tmp = this->Makefile->GetCurrentSourceDirectory();
tmp += "/";
tmp += unixPath;
unixPath = tmp;
- }
}
+ }
this->Makefile->AppendProperty("LINK_DIRECTORIES", unixPath.c_str());
}