aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qbs/modules/cpp/CppModule.qbs2
-rw-r--r--share/qbs/modules/cpp/msvc.js2
-rw-r--r--src/lib/corelib/api/project.cpp5
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp4
-rw-r--r--src/lib/corelib/buildgraph/rulenode.cpp2
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.cpp2
-rw-r--r--src/lib/corelib/language/language.cpp3
-rw-r--r--src/lib/corelib/tools/vsenvironmentdetector.cpp3
-rw-r--r--tests/auto/blackbox/testdata-qt/qrc/i.qbs2
-rw-r--r--tests/auto/blackbox/testdata-qt/qrc/test.cpp1
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp1
-rw-r--r--tests/auto/blackbox/tst_blackboxqt.cpp7
-rw-r--r--tests/benchmarker/benchmarker-main.cpp9
13 files changed, 36 insertions, 7 deletions
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs
index 41b811fc4..27d03ad55 100644
--- a/share/qbs/modules/cpp/CppModule.qbs
+++ b/share/qbs/modules/cpp/CppModule.qbs
@@ -486,7 +486,7 @@ Module {
+ "'; expected one of: "
+ WindowsUtils.knownWindowsVersions().map(function (a) {
return '"' + a + '"'; }).join(", ")
- + ". See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832.aspx");
+ + ". See https://docs.microsoft.com/en-us/windows/desktop/SysInfo/operating-system-version");
}
}
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js
index 8a2fc4d7a..d6df99dc2 100644
--- a/share/qbs/modules/cpp/msvc.js
+++ b/share/qbs/modules/cpp/msvc.js
@@ -473,7 +473,7 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
cmd.workingDirectory = FileInfo.path(primaryOutput.filePath)
cmd.responseFileUsagePrefix = '@';
cmd.stdoutFilterFunction = function(output) {
- return output.replace(/^ +Creating library.*\r\n$/, "");
+ return output.replace(/^(.*performing full link.*\r\n)? +Creating library.*\r\n$/, "");
};
commands.push(cmd);
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp
index bad18cab9..5bbfb31c7 100644
--- a/src/lib/corelib/api/project.cpp
+++ b/src/lib/corelib/api/project.cpp
@@ -806,6 +806,11 @@ ProjectTransformerData ProjectPrivate::transformerData()
tData.d->outputs << createArtifactData(a, product, targetArtifacts);
for (const Artifact * const child : filterByType<Artifact>(a->children))
allInputs << child;
+ for (Artifact * const a
+ : RulesApplicator::collectAuxiliaryInputs(t->rule.get(), product.get())) {
+ if (a->artifactType == Artifact::Generated)
+ tData.d->inputs << createArtifactData(a, product, targetArtifacts);
+ }
}
for (const Artifact * const input : allInputs)
tData.d->inputs << createArtifactData(input, product, targetArtifacts);
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp
index 13b21d40e..1012a1d4e 100644
--- a/src/lib/corelib/buildgraph/executor.cpp
+++ b/src/lib/corelib/buildgraph/executor.cpp
@@ -794,7 +794,9 @@ void Executor::rescueOldBuildData(Artifact *artifact, bool *childrenAdded = 0)
<< "not in the project's list of dependencies anymore.";
break;
}
- artifact->fileDependencies.insert(static_cast<FileDependency *>(*depIt));
+ FileDependency * const dep = static_cast<FileDependency *>(*depIt);
+ dep->clearTimestamp();
+ artifact->fileDependencies.insert(dep);
}
if (canRescue) {
diff --git a/src/lib/corelib/buildgraph/rulenode.cpp b/src/lib/corelib/buildgraph/rulenode.cpp
index 359054704..b3fc56031 100644
--- a/src/lib/corelib/buildgraph/rulenode.cpp
+++ b/src/lib/corelib/buildgraph/rulenode.cpp
@@ -217,6 +217,8 @@ ArtifactSet RuleNode::currentInputArtifacts() const
// This can e.g. happen for the ["cpp", "hpp"] -> ["hpp", "cpp", "unmocable"] rule.
continue;
}
+ if (artifact->fileTags().intersects(m_rule->excludedInputs))
+ continue;
s += artifact;
}
}
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp
index d87d690a9..5962eb346 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp
@@ -176,6 +176,8 @@ static QStringList toStringList(const ArtifactSet &artifacts)
void RulesApplicator::doApply(const ArtifactSet &inputArtifacts, QScriptValue &prepareScriptContext)
{
evalContext()->checkForCancelation();
+ for (const Artifact *inputArtifact : inputArtifacts)
+ QBS_CHECK(!inputArtifact->fileTags().intersects(m_rule->excludedInputs));
qCDebug(lcBuildGraph) << "apply rule" << m_rule->toString()
<< toStringList(inputArtifacts).join(QLatin1String(",\n "));
diff --git a/src/lib/corelib/language/language.cpp b/src/lib/corelib/language/language.cpp
index 4e83c4fca..66854a13e 100644
--- a/src/lib/corelib/language/language.cpp
+++ b/src/lib/corelib/language/language.cpp
@@ -281,7 +281,8 @@ QString Rule::toString() const
bool Rule::acceptsAsInput(Artifact *artifact) const
{
- return artifact->fileTags().intersects(inputs);
+ return artifact->fileTags().intersects(inputs)
+ && !artifact->fileTags().intersects(excludedInputs);
}
FileTags Rule::staticOutputFileTags() const
diff --git a/src/lib/corelib/tools/vsenvironmentdetector.cpp b/src/lib/corelib/tools/vsenvironmentdetector.cpp
index 9beb534e1..32e6d3497 100644
--- a/src/lib/corelib/tools/vsenvironmentdetector.cpp
+++ b/src/lib/corelib/tools/vsenvironmentdetector.cpp
@@ -217,7 +217,8 @@ void VsEnvironmentDetector::writeBatchFile(QIODevice *device, const QString &vcv
const std::vector<MSVC *> &msvcs) const
{
const QStringList varnames = QStringList() << StringConstants::pathEnvVar()
- << QLatin1String("INCLUDE") << QLatin1String("LIB");
+ << QLatin1String("INCLUDE") << QLatin1String("LIB") << QLatin1String("WindowsSdkDir")
+ << QLatin1String("WindowsSDKVersion");
QTextStream s(device);
s << "@echo off" << endl;
for (const MSVC *msvc : msvcs) {
diff --git a/tests/auto/blackbox/testdata-qt/qrc/i.qbs b/tests/auto/blackbox/testdata-qt/qrc/i.qbs
index 71e7524e1..c005490c4 100644
--- a/tests/auto/blackbox/testdata-qt/qrc/i.qbs
+++ b/tests/auto/blackbox/testdata-qt/qrc/i.qbs
@@ -11,7 +11,7 @@ Project {
files: [
"bla.cpp",
"bla.qrc",
- "stuff.txt"
+ //"test.cpp",
]
}
}
diff --git a/tests/auto/blackbox/testdata-qt/qrc/test.cpp b/tests/auto/blackbox/testdata-qt/qrc/test.cpp
new file mode 100644
index 000000000..7da700fd1
--- /dev/null
+++ b/tests/auto/blackbox/testdata-qt/qrc/test.cpp
@@ -0,0 +1 @@
+void test() {}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 6a01b614b..116984879 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -2049,6 +2049,7 @@ void TestBlackbox::trackAddFileTag()
ccp("../after", ".");
touch("main.cpp");
touch("trackFileTags.qbs");
+ waitForFileUnlock();
QCOMPARE(runQbs(runParams), 0);
output = m_qbsStdout.split('\n');
QCOMPARE(output.takeFirst().trimmed().constData(), "there's 15 foo here");
diff --git a/tests/auto/blackbox/tst_blackboxqt.cpp b/tests/auto/blackbox/tst_blackboxqt.cpp
index cd3239be7..3ab2c601c 100644
--- a/tests/auto/blackbox/tst_blackboxqt.cpp
+++ b/tests/auto/blackbox/tst_blackboxqt.cpp
@@ -225,6 +225,7 @@ void TestBlackboxQt::pluginMetaData()
QVERIFY2(m_qbsStderr.contains("all ok!"), m_qbsStderr.constData());
WAIT_FOR_NEW_TIMESTAMP();
touch("metadata.json");
+ waitForFileUnlock();
QCOMPARE(runQbs(), 0);
QVERIFY2(m_qbsStdout.contains("moc"), m_qbsStdout.constData());
}
@@ -366,6 +367,8 @@ void TestBlackboxQt::track_qrc()
{
QDir::setCurrent(testDataDir + "/qrc");
QCOMPARE(runQbs(QbsRunParameters("run")), 0);
+ QVERIFY2(m_qbsStdout.contains("rcc"), m_qbsStdout.constData());
+ QVERIFY2(!m_qbsStdout.contains("compiling test.cpp"), m_qbsStdout.constData());
const QString fileName = relativeExecutableFilePath("i");
QVERIFY2(regularFileExists(fileName), qPrintable(fileName));
QDateTime dt = QFileInfo(fileName).lastModified();
@@ -377,8 +380,11 @@ void TestBlackboxQt::track_qrc()
f.write("bla");
f.close();
}
+ REPLACE_IN_FILE("i.qbs", "//\"test.cpp\"", "\"test.cpp\"");
waitForFileUnlock();
QCOMPARE(runQbs(QbsRunParameters("run")), 0);
+ QVERIFY2(m_qbsStdout.contains("rcc"), m_qbsStdout.constData());
+ QVERIFY2(m_qbsStdout.contains("compiling test.cpp"), m_qbsStdout.constData());
QVERIFY(regularFileExists(fileName));
QVERIFY(dt < QFileInfo(fileName).lastModified());
WAIT_FOR_NEW_TIMESTAMP();
@@ -386,6 +392,7 @@ void TestBlackboxQt::track_qrc()
QCOMPARE(runQbs(), 0);
QVERIFY2(m_qbsStdout.contains("Resolving"), m_qbsStdout.constData());
QVERIFY2(!m_qbsStdout.contains("rcc"), m_qbsStdout.constData());
+ QVERIFY2(!m_qbsStdout.contains("compiling test.cpp"), m_qbsStdout.constData());
}
void TestBlackboxQt::unmocable()
diff --git a/tests/benchmarker/benchmarker-main.cpp b/tests/benchmarker/benchmarker-main.cpp
index 51eb85dcf..2aa379372 100644
--- a/tests/benchmarker/benchmarker-main.cpp
+++ b/tests/benchmarker/benchmarker-main.cpp
@@ -105,8 +105,15 @@ static void printResults(Activities activities, const BenchmarkResults &results,
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
+
CommandLineParser clParser;
- clParser.parse();
+ try {
+ clParser.parse();
+ } catch (const Exception &e) {
+ std::cerr << qPrintable(e.description()) << std::endl;
+ return EXIT_FAILURE;
+ }
+
Benchmarker benchmarker(clParser.activies(), clParser.oldCommit(), clParser.newCommit(),
clParser.testProjectFilePath(), clParser.qbsRepoDirPath());
try {