cppcheck: keep ctu-info files if there is a cppcheck build dir

This commit is contained in:
Daniel Marjamäki 2022-07-12 10:14:14 +02:00
parent 47c2a01392
commit a93c2c5263
1 changed files with 3 additions and 2 deletions

View File

@ -1439,8 +1439,9 @@ void CppCheck::executeAddonsWholeProgram(const std::map<std::string, std::size_t
mExitCode = 1; mExitCode = 1;
} }
for (const std::string &f: ctuInfoFiles) { if (mSettings.buildDir.empty()) {
std::remove(f.c_str()); for (const std::string &f: ctuInfoFiles)
std::remove(f.c_str());
} }
} }