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>
This commit is contained in:
parent
b9d1dc43f2
commit
134ee7d932
@ -1248,6 +1248,9 @@
|
||||
subproject.
|
||||
\row \li no_include_pwd \li Do not add the current directory to
|
||||
INCLUDEPATHS.
|
||||
\row \li compile_included_sources \li By default, qmake does not
|
||||
compile source files that are included in other source files. This
|
||||
option disables this behavior.
|
||||
\endtable
|
||||
|
||||
When you use the \c debug_and_release option (which is the default under
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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 &);
|
||||
|
Loading…
x
Reference in New Issue
Block a user