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.
This commit is contained in:
Brad King
2024-02-08 16:46:53 -05:00
parent f4b5152f47
commit 58a271e60b
+3
View File
@@ -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();
}