summaryrefslogtreecommitdiffstats
path: root/Source/cmServerProtocol.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2018-06-01 13:53:41 (GMT)
committerBrad King <brad.king@kitware.com>2018-06-01 13:53:42 (GMT)
commitd7204e649ed4ebb19bb341b4e49eb51514364922 (patch)
treed9ac3ded5ae6899be7188795011743fe3e6da0a6 /Source/cmServerProtocol.cxx
parent12fed3edb107c949671043196fa94c542b45452a (diff)
downloadCMake-d7204e649ed4ebb19bb341b4e49eb51514364922.zip
CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.gz
CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.bz2
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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/cmServerProtocol.cxx')
-rw-r--r--Source/cmServerProtocol.cxx36
1 files changed, 23 insertions, 13 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 7c10110..c267160 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -300,7 +300,8 @@ static bool getOrTestValue(cmState* state, const std::string& key,
value = cachedValue;
}
if (!cachedValue.empty() && cachedValue != value) {
- setErrorMessage(errorMessage, std::string("\"") + key +
+ setErrorMessage(errorMessage,
+ std::string("\"") + key +
"\" is set but incompatible with configured " +
keyDescription + " value.");
return false;
@@ -320,7 +321,8 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
std::string platform = request.Data[kPLATFORM_KEY].asString();
if (buildDirectory.empty()) {
- setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kBUILD_DIRECTORY_KEY +
"\" is missing.");
return false;
}
@@ -328,7 +330,8 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
cmake* cm = CMakeInstance();
if (cmSystemTools::PathExists(buildDirectory)) {
if (!cmSystemTools::FileIsDirectory(buildDirectory)) {
- setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kBUILD_DIRECTORY_KEY +
"\" exists but is not a directory.");
return false;
}
@@ -369,17 +372,20 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
}
if (sourceDirectory.empty()) {
- setErrorMessage(errorMessage, std::string("\"") + kSOURCE_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kSOURCE_DIRECTORY_KEY +
"\" is unset but required.");
return false;
}
if (!cmSystemTools::FileIsDirectory(sourceDirectory)) {
- setErrorMessage(errorMessage, std::string("\"") + kSOURCE_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kSOURCE_DIRECTORY_KEY +
"\" is not a directory.");
return false;
}
if (generator.empty()) {
- setErrorMessage(errorMessage, std::string("\"") + kGENERATOR_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kGENERATOR_KEY +
"\" is unset but required.");
return false;
}
@@ -391,7 +397,8 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
return info.name == generator;
});
if (baseIt == generators.end()) {
- setErrorMessage(errorMessage, std::string("Generator \"") + generator +
+ setErrorMessage(errorMessage,
+ std::string("Generator \"") + generator +
"\" not supported.");
return false;
}
@@ -629,8 +636,9 @@ struct hash<LanguageData>
size_t result =
hash<std::string>()(in.Language) ^ hash<std::string>()(in.Flags);
for (auto const& i : in.IncludePathList) {
- result = result ^ (hash<std::string>()(i.first) ^
- (i.second ? std::numeric_limits<size_t>::max() : 0));
+ result = result ^
+ (hash<std::string>()(i.first) ^
+ (i.second ? std::numeric_limits<size_t>::max() : 0));
}
for (auto const& i : in.Defines) {
result = result ^ hash<std::string>()(i);
@@ -726,8 +734,9 @@ static Json::Value DumpSourceFilesList(
for (const auto& include : includes) {
fileData.IncludePathList.push_back(
- std::make_pair(include, target->IsSystemIncludeDirectory(
- include, config, fileData.Language)));
+ std::make_pair(include,
+ target->IsSystemIncludeDirectory(
+ include, config, fileData.Language)));
}
}
@@ -745,8 +754,9 @@ static Json::Value DumpSourceFilesList(
const std::string defPropName =
"COMPILE_DEFINITIONS_" + cmSystemTools::UpperCase(config);
if (const char* config_defs = file->GetProperty(defPropName)) {
- lg->AppendDefines(defines, genexInterpreter.Evaluate(
- config_defs, COMPILE_DEFINITIONS));
+ lg->AppendDefines(
+ defines,
+ genexInterpreter.Evaluate(config_defs, COMPILE_DEFINITIONS));
}
defines.insert(ld.Defines.begin(), ld.Defines.end());