Skip to content

Commit

Permalink
updated search path.
Browse files Browse the repository at this point in the history
  • Loading branch information
treefrogframework committed Feb 22, 2022
1 parent 4437b3e commit 3d66af1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,22 @@ QString Compiler::cxx()
}
#endif
} else {
#ifdef Q_OS_WIN
QFileInfo fi(compiler);
if (!fi.isAbsolute()) {
compiler = searchPath(compiler);
}
#else
// check path
compiler = searchPath(compiler);
#endif
}

if (compiler.isEmpty()) {
qCritical() << "Compiler not found." << conf->value("CXX").toString().trimmed();
#ifdef Q_OS_WIN
qCritical() << "Remember to call vcvarsall.bat to complete environment setup.";
#endif
std::exit(1);
}

Expand Down
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ int main(int argv, char *argc[])
return ret;
}

// Check compiler
Compiler::cxx();

int ret = interpreter();
delete conf;
return ret;
Expand Down

0 comments on commit 3d66af1

Please sign in to comment.