diff options
-rw-r--r-- | Source/cmake.cxx | 10 | ||||
-rw-r--r-- | Source/cmaketest.cxx | 9 |
2 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 42c4f8f..6eaba36 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -591,13 +591,11 @@ int cmake::CMakeCommand(std::vector<std::string>& args) time(&time_start); clock_start = clock(); - cmSystemTools::RunCommand(command.c_str(), output, 0, true); + cmSystemTools::RunSingleCommand(command.c_str()); clock_finish = clock(); time(&time_finish); - std::cout << output.c_str(); - double clocks_per_sec = (double)CLOCKS_PER_SEC; std::cout << "Elapsed time: " << (long)(time_finish - time_start) << " s. (time)" @@ -621,10 +619,10 @@ int cmake::CMakeCommand(std::vector<std::string>& args) } int retval = 0; - if ( cmSystemTools::RunCommand(command.c_str(), output, retval, - directory.c_str(), false) ) + int timeout = 0; + if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, &retval, + directory.c_str(), true, timeout) ) { - std::cout << output.c_str(); return retval; } diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 152d601..d28fc6c 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -183,7 +183,7 @@ int do_cmaketest (int argc, char **argv) { // if there are spaces in the makeCommand, assume a full path // and convert it to a path with no spaces in it as the - // RunCommand does not like spaces + // RunSingleCommand does not like spaces #if defined(_WIN32) && !defined(__CYGWIN__) if(makeCommand.find(' ') != std::string::npos) { @@ -218,7 +218,8 @@ int do_cmaketest (int argc, char **argv) cleanCommand += " clean"; std::cout << "Running make clean command: " << cleanCommand.c_str() << " ...\n"; retVal = 0; - if (!cmSystemTools::RunCommand(cleanCommand.c_str(), output, retVal) || retVal) + if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), &output, &retVal) || + retVal) { std::cerr << "Error: " << cleanCommand.c_str() << " execution failed\n"; std::cerr << output.c_str() << "\n"; @@ -233,7 +234,7 @@ int do_cmaketest (int argc, char **argv) std::cout << "Running make command: " << makeCommand.c_str() << " ...\n"; retVal = 0; - if (!cmSystemTools::RunCommand(makeCommand.c_str(), output, retVal)) + if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), &output, &retVal)) { std::cerr << "Error: " << makeCommand.c_str() << " execution failed\n"; std::cerr << output.c_str() << "\n"; @@ -310,7 +311,7 @@ int do_cmaketest (int argc, char **argv) } std::cout << "Running test executable: " << fullPath.c_str() << "\n"; retVal = 0; - if (!cmSystemTools::RunCommand(fullPath.c_str(), output, retVal, 0, true)) + if (!cmSystemTools::RunSingleCommand(fullPath.c_str(), &output, &retVal)) { std::cerr << "Error: " << fullPath.c_str() << " execution failed\n"; // return to the original directory |