summaryrefslogtreecommitdiffstats
path: root/Source/cmakexbuild.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/cmakexbuild.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/cmakexbuild.cxx')
-rw-r--r--Source/cmakexbuild.cxx51
1 files changed, 19 insertions, 32 deletions
diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx
index 1385ff7..bdbc4da 100644
--- a/Source/cmakexbuild.cxx
+++ b/Source/cmakexbuild.cxx
@@ -32,62 +32,49 @@ int RunXCode(std::vector<const char*>& argv, bool& hitbug)
std::vector<char> err;
std::string line;
int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err);
- while(pipe != cmsysProcess_Pipe_None)
- {
- if(line.find("/bin/sh: bad interpreter: Text file busy")
- != line.npos)
- {
+ while (pipe != cmsysProcess_Pipe_None) {
+ if (line.find("/bin/sh: bad interpreter: Text file busy") != line.npos) {
hitbug = true;
std::cerr << "Hit xcodebuild bug : " << line << "\n";
- }
+ }
// if the bug is hit, no more output should be generated
// because it may contain bogus errors
// also remove all output with setenv in it to tone down
// the verbosity of xcodebuild
- if(!hitbug && (line.find("setenv") == line.npos))
- {
- if(pipe == cmsysProcess_Pipe_STDERR)
- {
+ if (!hitbug && (line.find("setenv") == line.npos)) {
+ if (pipe == cmsysProcess_Pipe_STDERR) {
std::cerr << line << "\n";
- }
- else if(pipe == cmsysProcess_Pipe_STDOUT)
- {
+ } else if (pipe == cmsysProcess_Pipe_STDOUT) {
std::cout << line << "\n";
- }
}
- pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err);
}
+ pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err);
+ }
cmsysProcess_WaitForExit(cp, 0);
- if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited)
- {
+ if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
return cmsysProcess_GetExitValue(cp);
- }
- if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error)
- {
+ }
+ if (cmsysProcess_GetState(cp) == cmsysProcess_State_Error) {
return -1;
- }
+ }
return -1;
}
-int main(int ac, char*av[])
+int main(int ac, char* av[])
{
std::vector<const char*> argv;
argv.push_back("xcodebuild");
- for(int i =1; i < ac; i++)
- {
+ for (int i = 1; i < ac; i++) {
argv.push_back(av[i]);
- }
+ }
argv.push_back(0);
bool hitbug = true;
int ret = 0;
- while(hitbug)
- {
+ while (hitbug) {
ret = RunXCode(argv, hitbug);
- }
- if(ret < 0)
- {
+ }
+ if (ret < 0) {
return 255;
- }
+ }
return ret;
}
-