diff options
author | Wouter Klouwen <wouter.klouwen@youview.com> | 2018-01-20 15:13:21 (GMT) |
---|---|---|
committer | Wouter Klouwen <wouter.klouwen@youview.com> | 2018-01-23 18:56:42 (GMT) |
commit | e6a80ccfc440ac8dd5e9e5405744c2423560fc02 (patch) | |
tree | 22b68d9379421a8a84ff5dab35e9689654334b04 /Source/cmakexbuild.cxx | |
parent | ff62b00522d1ddaeb88be241ab4a022f935b5c00 (diff) | |
download | CMake-e6a80ccfc440ac8dd5e9e5405744c2423560fc02.zip CMake-e6a80ccfc440ac8dd5e9e5405744c2423560fc02.tar.gz CMake-e6a80ccfc440ac8dd5e9e5405744c2423560fc02.tar.bz2 |
Make use of std::chrono throughout every component
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.
No functional change intended.
Diffstat (limited to 'Source/cmakexbuild.cxx')
-rw-r--r-- | Source/cmakexbuild.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx index 20ead47..2951945 100644 --- a/Source/cmakexbuild.cxx +++ b/Source/cmakexbuild.cxx @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "cmDuration.h" #include "cmSystemTools.h" // This is a wrapper program for xcodebuild @@ -27,7 +28,8 @@ int RunXCode(std::vector<const char*>& argv, bool& hitbug) std::vector<char> out; std::vector<char> err; std::string line; - int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err); + int pipe = + cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, err); while (pipe != cmsysProcess_Pipe_None) { if (line.find("/bin/sh: bad interpreter: Text file busy") != std::string::npos) { @@ -45,7 +47,8 @@ int RunXCode(std::vector<const char*>& argv, bool& hitbug) std::cout << line << "\n"; } } - pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err); + pipe = cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, + err); } cmsysProcess_WaitForExit(cp, nullptr); if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) { |