forked from qt-creator/qt-creator
CMake: Use FilePath::suffix() instead of manual construction
Change-Id: Id2bc542047ce5f4ff1937be90b976d330b69c51a Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -1143,9 +1143,8 @@ QList<ExtraCompiler *> CMakeBuildSystem::findExtraCompilers()
|
||||
const FilePaths fileList = p->files([&fileExtensions](const Node *n) {
|
||||
if (!Project::SourceFiles(n) || !n->isEnabled()) // isEnabled excludes nodes from the file system tree
|
||||
return false;
|
||||
const QString fp = n->filePath().toString();
|
||||
const int pos = fp.lastIndexOf('.');
|
||||
return pos >= 0 && fileExtensions.contains(fp.mid(pos + 1));
|
||||
const QString suffix = n->filePath().suffix();
|
||||
return !suffix.isEmpty() && fileExtensions.contains(suffix);
|
||||
});
|
||||
|
||||
qCDebug(cmakeBuildSystemLog) << "Finding Extra Compilers: Got list of files to check.";
|
||||
|
Reference in New Issue
Block a user