mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 07:57:12 +01:00
Visual Studio 2013 Compatibility
This commit is contained in:
@@ -25,10 +25,23 @@
|
||||
|
||||
#ifdef __clang__
|
||||
// clang is supported
|
||||
#define BUILD_COMPILER "clang " __VERSION__
|
||||
#elif defined(__GNUC__)
|
||||
#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#error "Sorry, you need gcc 4.6 or greater to compile."
|
||||
#endif
|
||||
#define BUILD_COMPILER "gcc " __VERSION__
|
||||
#elif defined(_MSC_VER)
|
||||
#if _MSC_VER < 1800
|
||||
#error "You need Visual Studio 2013 or greater to compile."
|
||||
#endif
|
||||
#pragma warning(disable:4244) // conversion from 'A' to 'B', possible loss of data
|
||||
#pragma warning(disable:4305) // 'initializing' : truncation from 'A' to 'B'
|
||||
#pragma warning(disable:4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#pragma warning(disable:4800) // 'A' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
|
||||
#define BUILD_COMPILER "msvc12"
|
||||
#define __PRETTY_FUNCTION__ __FUNCDNAME__
|
||||
#else
|
||||
#error "Compiler not supported."
|
||||
#endif
|
||||
@@ -44,12 +57,8 @@
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
#if !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#if !defined(_MSC_VER) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#error "C++0x is required to compile this application. Try updating your compiler."
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#warning "MSVC lacks some C++11 features used in this application; compilation is most likely to fail."
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user