Don't set up MSVC environment *after* locating tools

And warn if no Visual C++ installation is detected, similar to the now
suppressed warning issued by the batch file.
This commit is contained in:
Martin 2017-03-14 00:31:35 +01:00
parent 1c70b12e4c
commit ab85d209ab
2 changed files with 17 additions and 10 deletions

View file

@ -209,7 +209,7 @@ int executeAndWait(const char *commandLine) {
return exitCode;
}
bool setupMsvcEnvironment() {
bool setupMsvcEnvironmentImpl() {
if (getenv("VSINSTALLDIR"))
return true;
@ -311,6 +311,13 @@ bool setupMsvcEnvironment() {
return haveVsInstallDir;
}
bool setupMsvcEnvironment() {
const bool success = setupMsvcEnvironmentImpl();
if (!success)
warning(Loc(), "no Visual C++ installation detected");
return success;
}
} // namespace windows
#endif // _WIN32