Recognize MSVC 14 a.k.a. Visual Studio 2015 compiler.
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).
See #16854.
(this is a backport of f350bab
from master)
This commit is contained in:
committed by
Dimitri Schoolwerth
parent
c06c8edb5a
commit
1e2af26e47
@@ -63,6 +63,8 @@
|
|||||||
#define wxCOMPILER_PREFIX vc110
|
#define wxCOMPILER_PREFIX vc110
|
||||||
#elif _MSC_VER == 1800
|
#elif _MSC_VER == 1800
|
||||||
#define wxCOMPILER_PREFIX vc120
|
#define wxCOMPILER_PREFIX vc120
|
||||||
|
#elif _MSC_VER == 1900
|
||||||
|
#define wxCOMPILER_PREFIX vc140
|
||||||
#else
|
#else
|
||||||
#error "Unknown MSVC compiler version, please report to wx-dev."
|
#error "Unknown MSVC compiler version, please report to wx-dev."
|
||||||
#endif
|
#endif
|
||||||
|
@@ -53,7 +53,14 @@
|
|||||||
# define __VISUALC11__
|
# define __VISUALC11__
|
||||||
#elif __VISUALC__ < 1900
|
#elif __VISUALC__ < 1900
|
||||||
# define __VISUALC12__
|
# define __VISUALC12__
|
||||||
|
#elif __VISUALC__ < 2000
|
||||||
|
/* There is no __VISUALC13__! */
|
||||||
|
# define __VISUALC14__
|
||||||
#else
|
#else
|
||||||
|
/*
|
||||||
|
Don't forget to update include/msvc/wx/setup.h as well when adding
|
||||||
|
support for a newer MSVC version here.
|
||||||
|
*/
|
||||||
# pragma message("Please update wx/compiler.h to recognize this VC++ version")
|
# pragma message("Please update wx/compiler.h to recognize this VC++ version")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -102,7 +109,13 @@
|
|||||||
# define wxVISUALC_VERSION(major) 0
|
# define wxVISUALC_VERSION(major) 0
|
||||||
# define wxCHECK_VISUALC_VERSION(major) 0
|
# define wxCHECK_VISUALC_VERSION(major) 0
|
||||||
#else
|
#else
|
||||||
# define wxVISUALC_VERSION(major) ( (6 + major) * 100 )
|
/*
|
||||||
|
Things used to be simple with the _MSC_VER value and the version number
|
||||||
|
increasing in lock step, but _MSC_VER value of 1900 is VC14 and not the
|
||||||
|
non existing (presumably for the superstitious reasons) VC13, so we now
|
||||||
|
need to account for this with an extra offset.
|
||||||
|
*/
|
||||||
|
# define wxVISUALC_VERSION(major) ( (6 + (major >= 14 ? 1 : 0) + major) * 100 )
|
||||||
# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) )
|
# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user