diff options
-rw-r--r-- | doc/reference/modules/cpp-module.qdoc | 8 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/templates/core.qbs | 2 | ||||
-rw-r--r-- | share/qbs/modules/cpp/CppModule.qbs | 1 | ||||
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 4 | ||||
-rw-r--r-- | share/qbs/modules/cpp/iar.qbs | 3 | ||||
-rw-r--r-- | share/qbs/modules/cpp/keil.qbs | 2 | ||||
-rw-r--r-- | share/qbs/modules/cpp/sdcc.qbs | 3 | ||||
-rw-r--r-- | share/qbs/modules/cpp/windows-mingw.qbs | 2 | ||||
-rw-r--r-- | share/qbs/modules/cpp/windows-msvc-base.qbs | 9 |
9 files changed, 21 insertions, 13 deletions
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index a3ea55867..e6d63eaf8 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -618,6 +618,14 @@ */ /*! + \qmlproperty string cpp::objectSuffix + + A string to append to the generated object files. + + \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c ".o" or \c ".obj" +*/ + +/*! \qmlproperty pathList cpp::prefixHeaders \since Qbs 1.0.1 diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs index 8f0b0e2df..19c2d0239 100644 --- a/share/qbs/module-providers/Qt/templates/core.qbs +++ b/share/qbs/module-providers/Qt/templates/core.qbs @@ -445,7 +445,7 @@ Module { Rule { inputs: ["intermediate_obj"] Artifact { - filePath: input.completeBaseName + ".2.o" + filePath: input.completeBaseName + ".2" + input.cpp.objectSuffix fileTags: ["obj"] } prepare: { diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs index ca89bbd63..61c9c3f65 100644 --- a/share/qbs/modules/cpp/CppModule.qbs +++ b/share/qbs/modules/cpp/CppModule.qbs @@ -186,6 +186,7 @@ Module { property string debugInfoBundleSuffix: "" property string variantSuffix: "" property string dynamicLibraryImportSuffix: ".lib" + property string objectSuffix: ".o" property bool createSymlinks: true property stringList dynamicLibraries // list of names, will be linked with -lname property stringList staticLibraries // list of static library files diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 50744f492..3b6e5b106 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -608,7 +608,7 @@ CppModule { return [{ fileTags: tags, filePath: FileInfo.joinPaths(Utilities.getHash(input.baseDir), - input.fileName + ".o") + input.fileName + input.cpp.objectSuffix) }]; } @@ -623,7 +623,7 @@ CppModule { Artifact { fileTags: ["obj"] - filePath: FileInfo.joinPaths(Utilities.getHash(input.baseDir), input.fileName + ".o") + filePath: FileInfo.joinPaths(Utilities.getHash(input.baseDir), input.fileName + input.cpp.objectSuffix) } prepare: { diff --git a/share/qbs/modules/cpp/iar.qbs b/share/qbs/modules/cpp/iar.qbs index 26f7b96f3..6c00f8f36 100644 --- a/share/qbs/modules/cpp/iar.qbs +++ b/share/qbs/modules/cpp/iar.qbs @@ -88,8 +88,7 @@ CppModule { staticLibrarySuffix: IAR.staticLibrarySuffix(qbs) executableSuffix: IAR.executableSuffix(qbs) - - property string objectSuffix: IAR.objectSuffix(qbs) + objectSuffix: IAR.objectSuffix(qbs) imageFormat: IAR.imageFormat(qbs) diff --git a/share/qbs/modules/cpp/keil.qbs b/share/qbs/modules/cpp/keil.qbs index 66233fc84..aa4eaadf9 100644 --- a/share/qbs/modules/cpp/keil.qbs +++ b/share/qbs/modules/cpp/keil.qbs @@ -89,8 +89,8 @@ CppModule { staticLibrarySuffix: KEIL.staticLibrarySuffix(qbs) executableSuffix: KEIL.executableSuffix(qbs) + objectSuffix: KEIL.objectSuffix(qbs) - property string objectSuffix: KEIL.objectSuffix(qbs) property string mapFileSuffix: KEIL.mapFileSuffix(qbs) imageFormat: KEIL.imageFormat(qbs) diff --git a/share/qbs/modules/cpp/sdcc.qbs b/share/qbs/modules/cpp/sdcc.qbs index a44cee808..8b631d4e5 100644 --- a/share/qbs/modules/cpp/sdcc.qbs +++ b/share/qbs/modules/cpp/sdcc.qbs @@ -89,8 +89,7 @@ CppModule { staticLibrarySuffix: ".lib" executableSuffix: ".ihx" - - property string objectSuffix: ".rel" + objectSuffix: ".rel" imageFormat: "ihx" diff --git a/share/qbs/modules/cpp/windows-mingw.qbs b/share/qbs/modules/cpp/windows-mingw.qbs index ffed76cdd..ef2ef4946 100644 --- a/share/qbs/modules/cpp/windows-mingw.qbs +++ b/share/qbs/modules/cpp/windows-mingw.qbs @@ -68,7 +68,7 @@ MingwBaseModule { auxiliaryInputs: ["hpp"] Artifact { - filePath: Utilities.getHash(input.baseDir) + "/" + input.completeBaseName + "_res.o" + filePath: Utilities.getHash(input.baseDir) + "/" + input.completeBaseName + "_res" + input.cpp.objectSuffix fileTags: ["obj"] } diff --git a/share/qbs/modules/cpp/windows-msvc-base.qbs b/share/qbs/modules/cpp/windows-msvc-base.qbs index c103ee691..97ba7c64f 100644 --- a/share/qbs/modules/cpp/windows-msvc-base.qbs +++ b/share/qbs/modules/cpp/windows-msvc-base.qbs @@ -88,6 +88,7 @@ CppModule { dynamicLibrarySuffix: ".dll" executableSuffix: ".exe" debugInfoSuffix: ".pdb" + objectSuffix: ".obj" imageFormat: "pe" Properties { condition: product.multiplexByQbsProperties.contains("buildVariants") @@ -113,7 +114,7 @@ CppModule { auxiliaryInputs: ["hpp"] Artifact { fileTags: ['obj'] - filePath: Utilities.getHash(input.completeBaseName) + '_c.obj' + filePath: Utilities.getHash(input.completeBaseName) + '_c' + input.cpp.objectSuffix } Artifact { fileTags: ['c_pch'] @@ -131,7 +132,7 @@ CppModule { auxiliaryInputs: ["hpp"] Artifact { fileTags: ['obj'] - filePath: Utilities.getHash(input.completeBaseName) + '_cpp.obj' + filePath: Utilities.getHash(input.completeBaseName) + '_cpp' + input.cpp.objectSuffix } Artifact { fileTags: ['cpp_pch'] @@ -156,7 +157,7 @@ CppModule { var artifacts = []; artifacts.push({ fileTags: tags, - filePath: Utilities.getHash(input.baseDir) + "/" + input.fileName + ".obj" + filePath: Utilities.getHash(input.baseDir) + "/" + input.fileName + input.cpp.objectSuffix }); if (input.cpp.generateCompilerListingFiles) { artifacts.push({ @@ -326,7 +327,7 @@ CppModule { Rule { inputs: ["asm"] Artifact { - filePath: Utilities.getHash(input.baseDir) + "/" + input.completeBaseName + ".obj" + filePath: Utilities.getHash(input.baseDir) + "/" + input.completeBaseName + input.cpp.objectSuffix fileTags: ["obj"] } prepare: { |