From: Vadim Zeitlin Date: Wed, 3 Mar 2010 14:19:29 +0000 (+0000) Subject: Allow using version-specific vc prefix in msvc/wx/setup.h. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/18a4c97b3682efabeaf7f0e74f2673b1bdc33517 Allow using version-specific vc prefix in msvc/wx/setup.h. We still use just "vc" by default for compatibility but allow the user to predefine either wxMSVC_VERSION or wxMSVC_VERSION_AUTO to use the specified or version-dependent prefix instead. This is very convenient when using multiple MSVC versions. See #11022. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/msvc/wx/setup.h b/include/msvc/wx/setup.h index b123899eb2..81a92417bb 100644 --- a/include/msvc/wx/setup.h +++ b/include/msvc/wx/setup.h @@ -39,9 +39,32 @@ #endif // _UNICODE/!_UNICODE #endif -// compiler-specific prefix, we may use version-specific one in the future but -// for now it's just "vc" for all versions for compatibility -#define wxCOMPILER_PREFIX vc +// compiler-specific prefix: by default it's always just "vc" for compatibility +// reasons but if you use multiple MSVC versions you probably build them with +// COMPILER_PREFIX=vcXX and in this case you may want to either predefine +// wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate +// version depending on the compiler used +#ifdef wxMSVC_VERSION + #define wxCOMPILER_PREFIX wxCONCAT2(vc, wxMSVC_VERSION) +#elif defined(wxMSVC_VERSION_AUTO) + #if _MSC_VER == 1200 + #define wxCOMPILER_PREFIX vc60 + #elif _MSC_VER == 1300 + #define wxCOMPILER_PREFIX vc70 + #elif _MSC_VER == 1310 + #define wxCOMPILER_PREFIX vc71 + #elif _MSC_VER == 1400 + #define wxCOMPILER_PREFIX vc80 + #elif _MSC_VER == 1500 + #define wxCOMPILER_PREFIX vc90 + #elif _MSC_VER == 1600 + #define wxCOMPILER_PREFIX vc100 + #else + #error "Unknown MSVC compiler version, please report to wx-dev." + #endif +#else + #define wxCOMPILER_PREFIX vc +#endif // architecture-specific part: not used (again, for compatibility), for x86 #if defined(_M_X64)