mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 09:08:58 -05:00
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
This commit is contained in:
+2
-1
@@ -285,7 +285,8 @@ int main()
|
|||||||
return exit_code;
|
return exit_code;
|
||||||
|
|
||||||
// compile rc file with rc.exe
|
// 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);
|
std::string(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user