aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/cpp.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/cpp/cpp.js')
-rw-r--r--share/qbs/modules/cpp/cpp.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/share/qbs/modules/cpp/cpp.js b/share/qbs/modules/cpp/cpp.js
index b93d42f21..9f907580a 100644
--- a/share/qbs/modules/cpp/cpp.js
+++ b/share/qbs/modules/cpp/cpp.js
@@ -42,7 +42,7 @@ function languageVersion(versionArray, knownValues, lang) {
return versions[0];
for (var i = 0; i < knownValues.length; ++i) {
var candidate = knownValues[i];
- if (versions.contains(candidate))
+ if (versions.includes(candidate))
return candidate;
}
var version = versions[0];
@@ -134,7 +134,7 @@ function assemblerOutputArtifacts(input) {
}
function compilerOutputArtifacts(input, inputs) {
- var objTags = input.fileTags.contains("cpp_intermediate_object")
+ var objTags = input.fileTags.includes("cpp_intermediate_object")
? ["intermediate_obj"]
: ["obj"];
if (inputs) {
@@ -233,7 +233,7 @@ function collectLibraryDependencies(product) {
var artifactFilePaths = artifacts.map(function(a) { return a.filePath; });
var wholeArchive = dep.parameters.cpp && dep.parameters.cpp.linkWholeArchive;
var artifactsAreImportLibs = artifacts.length > 0
- && artifacts[0].fileTags.contains("dynamiclibrary_import");
+ && artifacts[0].fileTags.includes("dynamiclibrary_import");
for (var i = 0; i < artifactFilePaths.length; ++i) {
addFilePath(artifactFilePaths[i], wholeArchive,
artifactsAreImportLibs ? dep.name : undefined);
@@ -254,7 +254,7 @@ function collectLibraryDependencies(product) {
externalLibs.forEach(function(libName) {
var isObjectFile = objSuffix && libName.endsWith(objSuffix);
if (isObjectFile) {
- if (seenObjectFiles.contains(libName))
+ if (seenObjectFiles.includes(libName))
return;
seenObjectFiles.push(libName);
}
@@ -327,7 +327,10 @@ function collectIncludePaths(input) {
var includePaths = input.cpp.includePaths;
if (includePaths)
allIncludePaths = allIncludePaths.uniqueConcat(includePaths);
- return allIncludePaths;
+ var builtIns = input.cpp.compilerIncludePaths;
+ return allIncludePaths.filter(function(p) {
+ return !builtIns.includes(p);
+ });
}
function collectSystemIncludePaths(input) {
@@ -338,7 +341,10 @@ function collectSystemIncludePaths(input) {
var distributionIncludePaths = input.cpp.distributionIncludePaths;
if (distributionIncludePaths)
allIncludePaths = allIncludePaths.uniqueConcat(distributionIncludePaths);
- return allIncludePaths;
+ var builtIns = input.cpp.compilerIncludePaths;
+ return allIncludePaths.filter(function(p) {
+ return !builtIns.includes(p);
+ });
}
function collectPreincludePaths(input) {