forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user