Merge topic 'Wcomma'

5ff7fb592e Fixed all but one clang -Wcomma warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2828
This commit is contained in:
Brad King
2019-01-22 14:38:24 +00:00
committed by Kitware Robot
5 changed files with 13 additions and 11 deletions
+8 -6
View File
@@ -191,12 +191,14 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
std::string versionFile;
{
std::string out;
std::string::size_type pos = 0;
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out,
nullptr, nullptr, nullptr,
cmSystemTools::OUTPUT_NONE) &&
(pos = out.find(".app/"), pos != std::string::npos)) {
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
bool commandResult = cmSystemTools::RunSingleCommand(
"xcode-select --print-path", &out, nullptr, nullptr, nullptr,
cmSystemTools::OUTPUT_NONE);
if (commandResult) {
std::string::size_type pos = out.find(".app/");
if (pos != std::string::npos) {
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
}
}
}
if (!versionFile.empty() && cmSystemTools::FileExists(versionFile.c_str())) {