Make GetVisualStudioVersionCompiledWith private, and error out for untested versions.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
This commit is contained in:
parent
71eb51a1d2
commit
b2ab0a55e0
@ -128,9 +128,6 @@ inline namespace windows {
|
||||
std::string* WindSDK = nullptr,
|
||||
std::string* UniversalSDK = nullptr,
|
||||
bool Verbose = false);
|
||||
|
||||
///\brief Returns the VisualStudio version cling was compiled with
|
||||
int GetVisualStudioVersionCompiledWith();
|
||||
|
||||
} // namespace windows
|
||||
#endif // LLVM_ON_WIN32
|
||||
|
@ -352,11 +352,16 @@ bool GetSystemRegistryString(const char *keyPath, const char *valueName,
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
int GetVisualStudioVersionCompiledWith() {
|
||||
#if (_MSC_VER >= 1900)
|
||||
return 14;
|
||||
#endif
|
||||
static int GetVisualStudioVersionCompiledWith() {
|
||||
#if (_MSC_VER < 1900)
|
||||
return (_MSC_VER / 100) - 6;
|
||||
#elif (_MSC_VER < 1910)
|
||||
return 14;
|
||||
#else
|
||||
#error "Unsupported/Untested _MSC_VER"
|
||||
// As of now this is what is should be...have fun!
|
||||
return 15;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void fixupPath(std::string& Path, const char* Append = nullptr) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user