summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/testUVProcessChainHelper.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-05-26 14:30:05 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-05-26 15:25:32 (GMT)
commit67bb1ee50cde981dd36f2b9964013c330f7e92fe (patch)
tree1e6e4484530ff28ccfb0827f0925393c3d81dafd /Tests/CMakeLib/testUVProcessChainHelper.cxx
parentcf7b7600c669ea162e0c3960c3e4e3a5d04f3274 (diff)
downloadCMake-67bb1ee50cde981dd36f2b9964013c330f7e92fe.zip
CMake-67bb1ee50cde981dd36f2b9964013c330f7e92fe.tar.gz
CMake-67bb1ee50cde981dd36f2b9964013c330f7e92fe.tar.bz2
cmUVProcessChain: Add working directory option
Diffstat (limited to 'Tests/CMakeLib/testUVProcessChainHelper.cxx')
-rw-r--r--Tests/CMakeLib/testUVProcessChainHelper.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testUVProcessChainHelper.cxx b/Tests/CMakeLib/testUVProcessChainHelper.cxx
index bc0ef8e..82dafd2 100644
--- a/Tests/CMakeLib/testUVProcessChainHelper.cxx
+++ b/Tests/CMakeLib/testUVProcessChainHelper.cxx
@@ -7,6 +7,8 @@
#include <string>
#include <thread>
+#include "cmSystemTools.h"
+
static std::string getStdin()
{
char buffer[1024];
@@ -67,6 +69,11 @@ int main(int argc, char** argv)
std::abort();
#endif
}
+ if (command == "pwd") {
+ std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
+ std::cout << cwd << std::flush;
+ return 0;
+ }
return -1;
}