ProjectExplorer: Provide a ToolChain::isValid() base implementation

It checks for an executable compilerCommand(). This was used in Gcc,
Clang and Nim before. MSVC still overrides with a different test.

The formerly unconditional 'return true' for Keil/IAR/Sdcc uses that
check now, too.

Change-Id: I433a5ac6784277dc77129b2671c28af6913327a7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-11-13 12:53:14 +01:00
parent 09e2d6306e
commit 5d5a4ffbf8
12 changed files with 9 additions and 42 deletions

View File

@@ -159,6 +159,14 @@ Abis ToolChain::supportedAbis() const
return {targetAbi()};
}
bool ToolChain::isValid() const
{
if (compilerCommand().isEmpty())
return false;
QFileInfo fi = compilerCommand().toFileInfo();
return fi.isExecutable();
}
QStringList ToolChain::includedFiles(const QStringList &flags, const QString &directory) const
{
Q_UNUSED(flags)