forked from qt-creator/qt-creator
CMakePM: Remove compiler group for all generated sources
Change-Id: Ie30bb63c96438d3582a7d2b753b9677a4a95fe9b Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -411,7 +411,8 @@ static RawProjectParts generateRawProjectParts(const QFuture<void> &cancelFuture
|
|||||||
RawProjectPart rpp;
|
RawProjectPart rpp;
|
||||||
rpp.setProjectFileLocation(t.sourceDir.pathAppended("CMakeLists.txt").toString());
|
rpp.setProjectFileLocation(t.sourceDir.pathAppended("CMakeLists.txt").toString());
|
||||||
rpp.setBuildSystemTarget(t.name);
|
rpp.setBuildSystemTarget(t.name);
|
||||||
const QString postfix = needPostfix ? "_cg" + QString::number(count) : QString();
|
const QString postfix = needPostfix ? QString("_%1_%2").arg(ci.language).arg(count)
|
||||||
|
: QString();
|
||||||
rpp.setDisplayName(t.id + postfix);
|
rpp.setDisplayName(t.id + postfix);
|
||||||
rpp.setMacros(transform<QVector>(ci.defines, &DefineInfo::define));
|
rpp.setMacros(transform<QVector>(ci.defines, &DefineInfo::define));
|
||||||
rpp.setHeaderPaths(transform<QVector>(ci.includes, &IncludeInfo::path));
|
rpp.setHeaderPaths(transform<QVector>(ci.includes, &IncludeInfo::path));
|
||||||
@@ -436,6 +437,10 @@ static RawProjectParts generateRawProjectParts(const QFuture<void> &cancelFuture
|
|||||||
addToSources(si.path);
|
addToSources(si.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip groups with only generated source files e.g. <build-dir>/.rcc/qrc_<target>.cpp
|
||||||
|
if (allOf(ci.sources, [t](const auto &idx) { return t.sources.at(idx).isGenerated; }))
|
||||||
|
continue;
|
||||||
|
|
||||||
// If we are not in a pch compiler group, add all the headers that are not generated
|
// If we are not in a pch compiler group, add all the headers that are not generated
|
||||||
const bool hasPchSource = anyOf(sources, [buildDirectory](const QString &path) {
|
const bool hasPchSource = anyOf(sources, [buildDirectory](const QString &path) {
|
||||||
return isPchFile(buildDirectory, FilePath::fromString(path));
|
return isPchFile(buildDirectory, FilePath::fromString(path));
|
||||||
|
Reference in New Issue
Block a user