- fix: Project parser should not parse non-c/cpp files.

This commit is contained in:
Roy Qu 2023-02-09 09:45:09 +08:00
parent 78ff319a75
commit 0b7761fbc2
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Red Panda C++ Version 2.11
- fix: Correctly handle files whose name contains spaces in the generated makefile. - fix: Correctly handle files whose name contains spaces in the generated makefile.
- fix: Correctly handle custom obj folder in the generated makefile. - fix: Correctly handle custom obj folder in the generated makefile.
- enhancement: Support compile asm files using nasm in the project. - enhancement: Support compile asm files using nasm in the project.
- fix: Project parser should not parse non-c/cpp files.
Red Panda C++ Version 2.10 Red Panda C++ Version 2.10

View File

@ -587,7 +587,9 @@ void Project::resetParserProjectFiles()
mParser->clearProjectFiles(); mParser->clearProjectFiles();
mParser->clearProjectIncludePaths(); mParser->clearProjectIncludePaths();
foreach (const PProjectUnit& unit, mUnits) { foreach (const PProjectUnit& unit, mUnits) {
mParser->addProjectFile(unit->fileName(),true); if (isCFile(unit->fileName())
|| isHFile(unit->fileName()))
mParser->addProjectFile(unit->fileName(),true);
} }
foreach (const QString& s, mOptions.includeDirs) { foreach (const QString& s, mOptions.includeDirs) {
mParser->addProjectIncludePath(s); mParser->addProjectIncludePath(s);