- fix: don't add non-project header files to makefile's object rules

This commit is contained in:
Roy Qu 2022-04-09 09:35:17 +08:00
parent 39a0f87b94
commit 784d94c541
2 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,7 @@ Red Panda C++ Version 1.0.3
- fix: can't build project that has source files in subfolders - fix: can't build project that has source files in subfolders
- fix: can't build project that has custom object folder - fix: can't build project that has custom object folder
- fix: buttons in the project option dialog's output page don't work - fix: buttons in the project option dialog's output page don't work
- fix: don't add non-project header files to makefile's object rules
Red Panda C++ Version 1.0.2 Red Panda C++ Version 1.0.2
- enhancement: press tab in column mode won't exit column mode - enhancement: press tab in column mode won't exit column mode

View File

@ -343,7 +343,13 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
continue; continue;
if (!parser->isSystemHeaderFile(headerName) if (!parser->isSystemHeaderFile(headerName)
&& ! parser->isProjectHeaderFile(headerName)) { && ! parser->isProjectHeaderFile(headerName)) {
for (int j = 0;j<mProject->units().count();j++) {
PProjectUnit unit2 = mProject->units()[j];
if (unit2->fileName()==headerName) {
objStr = objStr + ' ' + genMakePath2(extractRelativePath(mProject->makeFileName(),headerName)); objStr = objStr + ' ' + genMakePath2(extractRelativePath(mProject->makeFileName(),headerName));
break;
}
}
} }
} }
} else { } else {