diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-01-20 17:45:45 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-01-20 17:50:18 +0100 |
commit | c0c9a8340913ffd6eadc09d25dbc2fc29a9bec54 (patch) | |
tree | 9a6519daa77694b65d8abb89a0e95e8f58331582 /qbs | |
parent | daac058f00a5894bc6ca4dfba3495fac0478902e (diff) | |
download | qt-creator-c0c9a8340913ffd6eadc09d25dbc2fc29a9bec54.tar.gz |
qbs build: Make use of cpp.cxxLanguageVersion.
Change-Id: Ia2f1870ec67ced58ad95bc6e1953575df2b88cd8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qbs')
-rw-r--r-- | qbs/imports/QtcFunctions/functions.js | 22 | ||||
-rw-r--r-- | qbs/imports/QtcProduct.qbs | 4 |
2 files changed, 2 insertions, 24 deletions
diff --git a/qbs/imports/QtcFunctions/functions.js b/qbs/imports/QtcFunctions/functions.js index 75fdef55d3..23a51f80e8 100644 --- a/qbs/imports/QtcFunctions/functions.js +++ b/qbs/imports/QtcFunctions/functions.js @@ -22,25 +22,3 @@ function versionIsAtLeast(actualVersion, expectedVersion) } return i === expectedVersionParts.length || expectedVersionParts[i] === 0; } - -function commonCxxFlags(qbs) -{ - var flags = []; - if (qbs.toolchain.contains("clang")) { - flags.push("-std=c++11"); - if (qbs.targetOS.contains("darwin")) - flags.push("-stdlib=libc++"); - } else if (qbs.toolchain.contains("gcc")) { - flags.push("-std=c++0x"); - } - return flags; -} - -function commonLinkerFlags(qbs) -{ - var flags = []; - if (qbs.toolchain.contains("clang") && qbs.targetOS.contains("darwin")) - flags.push("-stdlib=libc++"); - return flags; -} - diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index 7372fa7698..d38b7b0ecb 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -6,9 +6,9 @@ Product { Depends { name: "cpp" } cpp.defines: project.generalDefines - cpp.cxxFlags: QtcFunctions.commonCxxFlags(qbs) + cpp.cxxLanguageVersion: "c++11" cpp.linkerFlags: { - var flags = QtcFunctions.commonLinkerFlags(qbs); + var flags = []; if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw"))) flags.push("-Wl,-s"); return flags; |