diff options
author | Sean McBride <sean@rogue-research.com> | 2019-01-12 01:48:19 (GMT) |
---|---|---|
committer | Sean McBride <sean@rogue-research.com> | 2019-01-12 01:48:19 (GMT) |
commit | 5ff7fb592e5b9c5a6a0f05055a2bde5623e8cc54 (patch) | |
tree | 688fa13ec49befb499cbc95ad78f85d701aebdee /Source/cmGlobalXCodeGenerator.cxx | |
parent | 5a283b79e5fe1739142cc513a9a701855849b2f8 (diff) | |
download | CMake-5ff7fb592e5b9c5a6a0f05055a2bde5623e8cc54.zip CMake-5ff7fb592e5b9c5a6a0f05055a2bde5623e8cc54.tar.gz CMake-5ff7fb592e5b9c5a6a0f05055a2bde5623e8cc54.tar.bz2 |
Fixed all but one clang -Wcomma warning
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d6ab769..068cf5e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -176,12 +176,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())) { |