Browse Source

cmUVProcessChain: Implement no-extension-on-Windows support with libuv 1.48

Use the new `UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME` option when
building against libuv 1.48 or higher.
Brad King 2 years ago
parent
commit
58a271e60b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/cmUVProcessChain.cxx

+ 3 - 0
Source/cmUVProcessChain.cxx

@@ -311,6 +311,9 @@ void cmUVProcessChain::InternalData::SpawnProcess(
   arguments.push_back(nullptr);
   options.args = const_cast<char**>(arguments.data());
   options.flags = UV_PROCESS_WINDOWS_HIDE;
+#if UV_VERSION_MAJOR > 1 || (UV_VERSION_MAJOR == 1 && UV_VERSION_MINOR >= 48)
+  options.flags |= UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME;
+#endif
   if (!this->Builder->WorkingDirectory.empty()) {
     options.cwd = this->Builder->WorkingDirectory.c_str();
   }