diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-02-21 17:22:35 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-02-28 09:49:45 +0100 |
commit | c1583ddc0f50818763b4f3c88486b98760b60fb7 (patch) | |
tree | 4e8eab4039b0996fef332f8e5da0960256728962 /share/qbs/modules/cpp/msvc.js | |
parent | a726bd44ffbd615d6c2439f681d8c3048e5e21ca (diff) |
Rename ModUtils::findFirst() and ModUtils::appendAll().
The new names are "moduleProperty" and "moduleProperties", respectively.
These express much better what the functions do and also match their C++
counterparts.
Change-Id: I7f97f4b861f3ae58813377da593bc3b82be78bd3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share/qbs/modules/cpp/msvc.js')
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 25fa7f4cf..a51938ed5 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -1,8 +1,8 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, includePaths, systemIncludePaths, cFlags, cxxFlags) { var i; - var optimization = ModUtils.findFirst(input, "optimization") - var debugInformation = ModUtils.findFirst(input, "debugInformation") + var optimization = ModUtils.moduleProperty(input, "optimization") + var debugInformation = ModUtils.moduleProperty(input, "debugInformation") var args = ['/nologo', '/c'] // C or C++ @@ -26,12 +26,12 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl args.push('/MD') } // warnings: - var warningLevel = ModUtils.findFirst(input, "warningLevel") + var warningLevel = ModUtils.moduleProperty(input, "warningLevel") if (warningLevel === 'none') args.push('/w') if (warningLevel === 'all') args.push('/Wall') - if (ModUtils.findFirst(input, "treatWarningsAsErrors")) + if (ModUtils.moduleProperty(input, "treatWarningsAsErrors")) args.push('/WX') for (i in includePaths) args.push('/I' + FileInfo.toWindowsSeparators(includePaths[i])) @@ -46,7 +46,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl var pchOutput = outputs["c++_pch"] ? outputs["c++_pch"][0] : undefined // precompiled header file - var pch = ModUtils.findFirst(product, "precompiledHeader") + var pch = ModUtils.moduleProperty(product, "precompiledHeader") if (pch) { if (pchOutput) { // create pch @@ -58,7 +58,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl } else { // use pch var pchHeaderName = FileInfo.toWindowsSeparators(pch) - var pchName = FileInfo.toWindowsSeparators(ModUtils.findFirst(product, "precompiledHeaderDir") + var pchName = FileInfo.toWindowsSeparators(ModUtils.moduleProperty(product, "precompiledHeaderDir") + "\\.obj\\" + product.name + "\\" + product.name + ".pch") args.push("/FI" + pchHeaderName) args.push("/Yu" + pchHeaderName) @@ -80,7 +80,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.fileName) cmd.highlight = "compiler"; cmd.workingDirectory = FileInfo.path(objOutput.fileName) - cmd.responseFileThreshold = ModUtils.findFirst(product, "responseFileThreshold") + cmd.responseFileThreshold = ModUtils.moduleProperty(product, "responseFileThreshold") cmd.responseFileUsagePrefix = '@'; // cl.exe outputs the cpp file name. We filter that out. cmd.stdoutFilterFunction = "function(output) {"; @@ -94,8 +94,8 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, var i; var linkDLL = (outputs.dynamiclibrary ? true : false) var primaryOutput = (linkDLL ? outputs.dynamiclibrary[0] : outputs.application[0]) - var debugInformation = ModUtils.findFirst(product, "debugInformation") - var generateManifestFiles = !linkDLL && ModUtils.findFirst(product, "generateManifestFiles") + var debugInformation = ModUtils.moduleProperty(product, "debugInformation") + var generateManifestFiles = !linkDLL && ModUtils.moduleProperty(product, "generateManifestFiles") var args = ['/nologo'] if (linkDLL) { @@ -158,7 +158,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, cmd.description = 'linking ' + FileInfo.fileName(primaryOutput.fileName) cmd.highlight = 'linker'; cmd.workingDirectory = FileInfo.path(primaryOutput.fileName) - cmd.responseFileThreshold = ModUtils.findFirst(product, "responseFileThreshold") + cmd.responseFileThreshold = ModUtils.moduleProperty(product, "responseFileThreshold") cmd.responseFileUsagePrefix = '@'; cmd.stdoutFilterFunction = function(output) |