summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-02-01 11:11:59 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-02-08 12:07:54 +0100
commit134ee7d932391c7b3c1b801e64e4f5693c3cdd20 (patch)
tree18c84f15b1b7df86ffd0246aea41d65b6f0c158f /qmake/generators
parentb9d1dc43f2764d765caf9fa8102aafea268ed3bb (diff)
qmake: Introduce compile_included_sources CONFIG option
By default, qmake does not compile source files that are included in other source files. The new CONFIG option compile_included_sources disables this behavior. Pick-to: 5.15 Fixes: QTBUG-90801 Change-Id: I60c997938895f3a743d32ea385efdbe6bcf315bb Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp9
-rw-r--r--qmake/generators/makefile.h5
2 files changed, 10 insertions, 4 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 1f60f29215..41525c5778 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -943,6 +943,15 @@ MakefileGenerator::filterIncludedFiles(const char *var)
inputs.removeIf(isIncluded);
}
+void MakefileGenerator::processSources()
+{
+ if (project->isActiveConfig("compile_included_sources"))
+ return;
+
+ filterIncludedFiles("SOURCES");
+ filterIncludedFiles("GENERATED_SOURCES");
+}
+
static QString
qv(const ProString &val)
{
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 91016ff34d..720599fd96 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -201,10 +201,7 @@ protected:
virtual bool doDepends() const { return Option::mkfile::do_deps; }
void filterIncludedFiles(const char *);
- void processSources() {
- filterIncludedFiles("SOURCES");
- filterIncludedFiles("GENERATED_SOURCES");
- }
+ void processSources();
//for installs
virtual QString defaultInstall(const QString &);