fix: auto find compilers failed.
This commit is contained in:
parent
0e5ff0a75e
commit
07f6b975f1
|
@ -1599,7 +1599,7 @@ Settings::CompilerSet::CompilerSet(const QString& compilerFolder, const QString&
|
|||
QDir dir(compilerFolder);
|
||||
if (dir.exists(c_prog)) {
|
||||
|
||||
setProperties(dir.absoluteFilePath(c_prog));
|
||||
setProperties(compilerFolder,c_prog);
|
||||
|
||||
//manually set the directories
|
||||
setDirectories(compilerFolder, mCompilerType);
|
||||
|
@ -2092,15 +2092,15 @@ static void addExistingDirectory(QStringList& dirs, const QString& directory) {
|
|||
dirs.append(dirPath);
|
||||
}
|
||||
|
||||
void Settings::CompilerSet::setProperties(const QString& c_prog)
|
||||
void Settings::CompilerSet::setProperties(const QString& binDir, const QString& c_prog)
|
||||
{
|
||||
if (!fileExists(c_prog))
|
||||
return;
|
||||
QString binDir=extractFileDir(c_prog);
|
||||
// We have tested before the call
|
||||
// if (!fileExists(c_prog))
|
||||
// return;
|
||||
// Obtain version number and compiler distro etc
|
||||
QStringList arguments;
|
||||
arguments.append("-v");
|
||||
QByteArray output = getCompilerOutput(binDir,c_prog,arguments);
|
||||
QByteArray output = getCompilerOutput(binDir, c_prog,arguments);
|
||||
|
||||
//Target
|
||||
QByteArray targetStr = "Target: ";
|
||||
|
|
|
@ -1246,7 +1246,7 @@ public:
|
|||
CompilerSet& operator= (const CompilerSet&& ) = delete;
|
||||
|
||||
// Initialization
|
||||
void setProperties(const QString& c_prog);
|
||||
void setProperties(const QString& binDir, const QString& c_prog);
|
||||
|
||||
void resetCompileOptionts();
|
||||
bool setCompileOption(const QString& key, int valIndex);
|
||||
|
|
Loading…
Reference in New Issue