path: root/qmake
diff options
authorOswald Buddenhagen <>2015-11-23 14:14:46 +0100
committerFrederik Gladhorn <>2016-01-08 09:36:13 +0000
commit282f15feaae4c525602d537ab65cb61987eb5f7f (patch)
tree91b0b6ed14b7dc58f0f7f3e9c09a98cf0a7ab8d3 /qmake
parentc7797184f0813606c93fe7316b7b42e28b81b68b (diff)
rewrite qtAddToolEnv()
the primary purpose is making env var prepend mode work for unset variables on windows. this is achieved by using a conditional and delayed variable expansion. however, the latter is disabled by default and can be locally enabled only in batch files. therefore, write wrapper scripts and substitute them for the actual commands. we do this also on unix, both for consistency and simply because the commands look much less confusing. this change is slightly backwards-incompatible, as invoking qtAddToolEnv() multiple times on the same command will now make a total mess. also, invoking it on a command that contains 'make' macro expansions isn't a good idea, so testcase.prf needed an adjustment. the function is an undocumented internal, so Nobody Should Care (TM). this also reverts 80ebedecf9, as it's obsolete now. Change-Id: I8394b77868b495abcf27b688996ca74c40b80994 Reviewed-by: Simon Hausmann <>
Diffstat (limited to 'qmake')
1 files changed, 0 insertions, 4 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 339dae953a..18457ac5ad 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2399,11 +2399,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
if (!CustomBuildTool.Description.isEmpty())
CustomBuildTool.Description += ", ";
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 += QLatin1String("endlocal");
int space = cmd.indexOf(' ');
QFileInfo finf(cmd.left(space));
if (CustomBuildTool.ToolPath.isEmpty())