From 03080d18eb20548f573bf5ff5a66c8eb38a6ebca Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 23 Oct 2023 16:46:18 -0400 Subject: cmcldeps: Restore support for rc.exe path not fully GetShortPathName-d In some cases `GetShortPathNameW` may not remove all spaces. If that happens with the path to `rc.exe`, cmcldeps needs to explicitly quote the path in the command it runs. This was exposed by commit 50a6e78a82 (cmSystemTools::RunSingleCommand(): Replace cmsysProcess with cmUVProcessChain, 2023-07-25, v3.28.0-rc1~138^2~4) because the underlying process execution library no longer reconstructs the command line without quotes around commands without spaces. Fixes: #25355 --- Source/cmcldeps.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 72805d3..5310166 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -285,7 +285,8 @@ int main() return exit_code; // compile rc file with rc.exe - return process(srcfilename, "", objfile, prefix, binpath + " " + rest, + std::string rc = cmStrCat('"', binpath, '"'); + return process(srcfilename, "", objfile, prefix, cmStrCat(rc, ' ', rest), std::string(), true); } -- cgit v0.12