Commit c0c9a834 authored by Christian Kandeler's avatar Christian Kandeler

qbs build: Make use of cpp.cxxLanguageVersion.

Change-Id: Ia2f1870ec67ced58ad95bc6e1953575df2b88cd8
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent daac058f
......@@ -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;
}
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment