diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-02 17:45:16 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-08 11:03:14 +0000 |
commit | 08b00f86891ec157e3fb354afc04ff33ebfdb44c (patch) | |
tree | 331bffbe8ce5636cfcb9f41d254f883da1cc19d5 /share/qbs/modules/cpp/msvc.js | |
parent | 2fd4c0a8e8a4a4dda54e29fb59a9b82a86d58643 (diff) | |
download | qbs-08b00f86891ec157e3fb354afc04ff33ebfdb44c.tar.gz |
Re-run process commands if a relevant environment variable has changed
Process commands can now declare that they are sensitive to certain
environment variables. If such a variable changes its value, we
invalidate the respective transformer.
[ChangeLog] Added new property "relevantEnvironmentVariables" to the
Command class
Change-Id: Id866dc676b3b483a5d843e6125c91829f5094eba
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/msvc.js')
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 25f9978cd..c2c85aa92 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -204,6 +204,7 @@ function prepareCompiler(project, product, inputs, outputs, input, output) { cmd.responseFileUsagePrefix = '@'; // cl.exe outputs the cpp file name. We filter that out. cmd.inputFileName = input.fileName; + cmd.relevantEnvironmentVariables = ["CL", "_CL_", "INCLUDE"]; cmd.stdoutFilterFunction = function(output) { return output.split(inputFileName + "\r\n").join(""); }; @@ -402,6 +403,7 @@ function prepareLinker(project, product, inputs, outputs, input, output) { var cmd = new Command(linkerPath, args) cmd.description = 'linking ' + primaryOutput.fileName; cmd.highlight = 'linker'; + cmd.relevantEnvironmentVariables = ["LINK", "_LINK_", "LIB", "TMP"]; cmd.workingDirectory = FileInfo.path(primaryOutput.filePath) cmd.responseFileUsagePrefix = '@'; cmd.stdoutFilterFunction = function(output) { |