diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-05-16 14:24:29 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-05-20 13:54:01 +0200 |
commit | 67f05790924646fe3623976f7794e2e7c97e3c3a (patch) | |
tree | 2d751fa3ebbc98194250080b946035b4ae37d984 /share/qbs/modules/cpp | |
parent | db6d4dbe277469b5b39413ca51b9067559566b28 (diff) |
use {input|output}.fileName where appropriate
Change-Id: I793210ba6eeeb3a15e78282e14b8e5ad6459c078
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'share/qbs/modules/cpp')
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 20 | ||||
-rw-r--r-- | share/qbs/modules/cpp/gcc.js | 2 | ||||
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 10 | ||||
-rw-r--r-- | share/qbs/modules/cpp/windows-mingw.qbs | 3 | ||||
-rw-r--r-- | share/qbs/modules/cpp/windows-msvc.qbs | 4 |
5 files changed, 19 insertions, 20 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 590964c92..d20b69b35 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -112,7 +112,7 @@ CppModule { prepare: { // Actual linker command. - var libFilePath = outputs["dynamiclibrary"][0].filePath; + var lib = outputs["dynamiclibrary"][0]; var platformLinkerFlags = ModUtils.moduleProperties(product, 'platformLinkerFlags'); var linkerFlags = ModUtils.moduleProperties(product, 'linkerFlags'); var commands = []; @@ -123,13 +123,13 @@ CppModule { args = args.concat([ '-Wl,--hash-style=gnu', '-Wl,--as-needed', - '-Wl,-soname=' + UnixUtils.soname(product, libFilePath) + '-Wl,-soname=' + UnixUtils.soname(product, lib.fileName) ]); } else if (product.moduleProperty("qbs", "targetOS").contains('darwin')) { var installNamePrefix = product.moduleProperty("cpp", "installNamePrefix"); if (installNamePrefix !== undefined) args.push("-Wl,-install_name," - + installNamePrefix + FileInfo.fileName(libFilePath)); + + installNamePrefix + lib.fileName); args.push("-Wl,-headerpad_max_install_names"); } args = args.concat(platformLinkerFlags); @@ -146,11 +146,11 @@ CppModule { } args.push('-o'); - args.push(libFilePath); + args.push(lib.filePath); args = args.concat(Gcc.linkerFlags(product, inputs)); args = args.concat(Gcc.additionalCompilerAndLinkerFlags(product)); var cmd = new Command(ModUtils.moduleProperty(product, "linkerPath"), args); - cmd.description = 'linking ' + FileInfo.fileName(libFilePath); + cmd.description = 'linking ' + lib.fileName; cmd.highlight = 'linker'; cmd.responseFileUsagePrefix = '@'; commands.push(cmd); @@ -207,12 +207,12 @@ CppModule { var links = outputs["dynamiclibrary_symlink"]; var symlinkCount = links.length; for (var i = 0; i < symlinkCount; ++i) { - cmd = new Command("ln", ["-sf", FileInfo.fileName(libFilePath), + cmd = new Command("ln", ["-sf", lib.fileName, links[i].filePath]); cmd.highlight = "filegen"; cmd.description = "creating symbolic link '" - + FileInfo.fileName(links[i].filePath) + "'"; - cmd.workingDirectory = FileInfo.path(libFilePath); + + links[i].fileName + "'"; + cmd.workingDirectory = FileInfo.path(lib.filePath); commands.push(cmd); } } @@ -252,7 +252,7 @@ CppModule { for (var i in inputs.obj) args.push(inputs.obj[i].filePath); var cmd = new Command(ModUtils.moduleProperty(product, "archiverPath"), args); - cmd.description = 'creating ' + FileInfo.fileName(output.filePath); + cmd.description = 'creating ' + output.fileName; cmd.highlight = 'linker' cmd.responseFileUsagePrefix = '@'; return cmd; @@ -327,7 +327,7 @@ CppModule { args = args.concat(Gcc.linkerFlags(product, inputs)); args = args.concat(Gcc.additionalCompilerAndLinkerFlags(product)); var cmd = new Command(ModUtils.moduleProperty(product, "linkerPath"), args); - cmd.description = 'linking ' + FileInfo.fileName(output.filePath); + cmd.description = 'linking ' + output.fileName; cmd.highlight = 'linker' cmd.responseFileUsagePrefix = '@'; return cmd; diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index 8f34c80c0..9045da4e6 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -300,7 +300,7 @@ function prepareCompiler(project, product, inputs, outputs, input, output) { } var cmd = new Command(compilerPath, args); - cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.filePath); + cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + input.fileName; if (pchOutput) cmd.description += ' (' + tag + ')'; cmd.highlight = "compiler"; diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 49e113c60..3eb805556 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -102,7 +102,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl args = wrapperArgs.concat(args); } var cmd = new Command(compilerPath, args) - cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.filePath); + cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + input.fileName; if (pchOutput) cmd.description += ' (' + tag + ')'; cmd.highlight = "compiler"; @@ -111,7 +111,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl // cl.exe outputs the cpp file name. We filter that out. cmd.stdoutFilterFunction = "function(output) {"; cmd.stdoutFilterFunction += "return output.replace(/" - + FileInfo.fileName(input.filePath) + "\\r\\n/g, '');"; + + input.fileName + "\\r\\n/g, '');"; cmd.stdoutFilterFunction += "}"; return cmd; } @@ -162,7 +162,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, linkerOutputNativeFilePath = FileInfo.toWindowsSeparators( FileInfo.path(primaryOutput.filePath) + "/intermediate." - + FileInfo.fileName(primaryOutput.filePath)); + + primaryOutput.fileName); manifestFileName = linkerOutputNativeFilePath + ".manifest"; args.push('/MANIFEST', '/MANIFESTFILE:' + manifestFileName) } else { @@ -199,7 +199,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, var commands = []; var cmd = new Command(product.moduleProperty("cpp", "linkerPath"), args) - cmd.description = 'linking ' + FileInfo.fileName(primaryOutput.filePath) + cmd.description = 'linking ' + primaryOutput.fileName; cmd.highlight = 'linker'; cmd.workingDirectory = FileInfo.path(primaryOutput.filePath) cmd.responseFileUsagePrefix = '@'; @@ -223,7 +223,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, "/outputresource:" + outputNativeFilePath + ";#" + (linkDLL ? "2" : "1") ] cmd = new Command("mt.exe", args) - cmd.description = 'embedding manifest into ' + FileInfo.fileName(primaryOutput.filePath) + cmd.description = 'embedding manifest into ' + primaryOutput.fileName; cmd.highlight = 'linker'; cmd.workingDirectory = FileInfo.path(primaryOutput.filePath) commands.push(cmd); diff --git a/share/qbs/modules/cpp/windows-mingw.qbs b/share/qbs/modules/cpp/windows-mingw.qbs index a3e7680a5..ea66d61f4 100644 --- a/share/qbs/modules/cpp/windows-mingw.qbs +++ b/share/qbs/modules/cpp/windows-mingw.qbs @@ -1,5 +1,4 @@ import qbs 1.0 -import qbs.FileInfo import qbs.ModUtils import qbs.WindowsUtils @@ -70,7 +69,7 @@ GenericGCC { args = args.concat(['-i', input.filePath, '-o', output.filePath]); var cmd = new Command(ModUtils.moduleProperty(product, "windresPath"), args); - cmd.description = 'compiling ' + FileInfo.fileName(input.filePath); + cmd.description = 'compiling ' + input.fileName; cmd.highlight = 'compiler'; return cmd; } diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs index 96277066d..2af9065a6 100644 --- a/share/qbs/modules/cpp/windows-msvc.qbs +++ b/share/qbs/modules/cpp/windows-msvc.qbs @@ -183,7 +183,7 @@ CppModule { args.push(fileName) } var cmd = new Command("lib.exe", args); - cmd.description = 'creating ' + FileInfo.fileName(output.filePath) + cmd.description = 'creating ' + output.fileName; cmd.highlight = 'linker'; cmd.workingDirectory = FileInfo.path(output.filePath) cmd.responseFileUsagePrefix = '@'; @@ -230,7 +230,7 @@ CppModule { args = args.concat(['/fo', output.filePath, input.filePath]); var cmd = new Command('rc', args); - cmd.description = 'compiling ' + FileInfo.fileName(input.filePath); + cmd.description = 'compiling ' + input.fileName; cmd.highlight = 'compiler'; // Remove the first two lines of stdout. That's the logo. |