mirror of https://github.com/qt/qtbase.git
Run VS custom build step in new environment variable scope.
Task-number: QTBUG-32366 Change-Id: I99161b23e3d323fd88766ebe83c8bbfc1d50944e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
bf200fc948
commit
80ebedecf9
|
@ -2397,7 +2397,11 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
||||||
if (!CustomBuildTool.Description.isEmpty())
|
if (!CustomBuildTool.Description.isEmpty())
|
||||||
CustomBuildTool.Description += ", ";
|
CustomBuildTool.Description += ", ";
|
||||||
CustomBuildTool.Description += cmd_name;
|
CustomBuildTool.Description += cmd_name;
|
||||||
|
// Execute custom build steps in an environment variable scope to prevent unwanted
|
||||||
|
// side effects for downstream build steps
|
||||||
|
CustomBuildTool.CommandLine += QLatin1String("setlocal");
|
||||||
CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed());
|
CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed());
|
||||||
|
CustomBuildTool.CommandLine += QLatin1String("endlocal");
|
||||||
int space = cmd.indexOf(' ');
|
int space = cmd.indexOf(' ');
|
||||||
QFileInfo finf(cmd.left(space));
|
QFileInfo finf(cmd.left(space));
|
||||||
if (CustomBuildTool.ToolPath.isEmpty())
|
if (CustomBuildTool.ToolPath.isEmpty())
|
||||||
|
|
Loading…
Reference in New Issue