99//
1010
1111#include " lib/Lib/CMakeExecution.hpp"
12+ #include " lib/Lib/ExecuteAndWaitWithLogging.hpp"
1213#include " lib/Support/Path.hpp"
1314
1415#include < llvm/Support/FileSystem.h>
@@ -37,7 +38,7 @@ getCmakePath()
3738 MRDOCS_CHECK (path, " CMake executable not found" );
3839 std::optional<llvm::StringRef> const redirects[] = {llvm::StringRef (), llvm::StringRef (), llvm::StringRef ()};
3940 std::vector<llvm::StringRef> const args = {*path, " --version" };
40- int const result = llvm::sys::ExecuteAndWait (*path, args, std::nullopt , redirects);
41+ int const result = ExecuteAndWaitWithLogging (*path, args, std::nullopt , redirects);
4142 MRDOCS_CHECK (result == 0 , " CMake execution failed when checking version" );
4243 return *path;
4344}
@@ -51,7 +52,7 @@ executeCmakeHelp(llvm::StringRef cmakePath)
5152 MRDOCS_CHECK (errOutputPath, " Failed to create temporary file" );
5253 std::optional<llvm::StringRef> const redirects[] = {llvm::StringRef (), outputPath.path (), errOutputPath.path ()};
5354 std::vector<llvm::StringRef> const args = {cmakePath, " --help" };
54- int const result = llvm::sys::ExecuteAndWait (cmakePath, args, std::nullopt , redirects);
55+ int const result = ExecuteAndWaitWithLogging (cmakePath, args, std::nullopt , redirects);
5556 if (result != 0 )
5657 {
5758 auto const bufferOrError = llvm::MemoryBuffer::getFile (errOutputPath.path ());
@@ -89,7 +90,7 @@ executeCmakeSystemInformation(llvm::StringRef cmakePath)
8990 MRDOCS_CHECK (errOutputPath, " Failed to create temporary file" );
9091 std::optional<llvm::StringRef> const redirects[] = {llvm::StringRef (), outputPath.path (), errOutputPath.path ()};
9192 std::vector<llvm::StringRef> const args = {cmakePath, " --system-information" };
92- int const result = llvm::sys::ExecuteAndWait (cmakePath, args, std::nullopt , redirects);
93+ int const result = ExecuteAndWaitWithLogging (cmakePath, args, std::nullopt , redirects);
9394 if (result != 0 )
9495 {
9596 auto const bufferOrError = llvm::MemoryBuffer::getFile (errOutputPath.path ());
@@ -518,7 +519,7 @@ executeCmakeExportCompileCommands(llvm::StringRef projectPath, llvm::StringRef c
518519 MRDOCS_TRY (auto args, generateCMakeArgs (cmakePath, cmakeArgs, projectPath, buildDir));
519520 std::vector<llvm::StringRef> argsRef (args.begin (), args.end ());
520521
521- int const result = llvm::sys::ExecuteAndWait (cmakePath, argsRef, std::nullopt , redirects);
522+ int const result = ExecuteAndWaitWithLogging (cmakePath, argsRef, std::nullopt , redirects);
522523 if (result != 0 ) {
523524 return Unexpected (Error (" CMake execution failed" ));
524525 }
0 commit comments