]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/build.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: Runtime build options checking
4 // Author: Vadim Zeitlin, Vaclav Slavik
8 // Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
15 #include "wx/version.h"
17 // ----------------------------------------------------------------------------
18 // WX_BUILD_OPTIONS_SIGNATURE
19 // ----------------------------------------------------------------------------
21 #define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x)
22 #define __WX_BO_STRINGIZE0(x) #x
24 #if (wxMINOR_VERSION % 2) == 0
25 #define __WX_BO_VERSION(x,y,z) \
26 __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y)
28 #define __WX_BO_VERSION(x,y,z) \
29 __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
33 #define __WX_BO_DEBUG "debug"
35 #define __WX_BO_DEBUG "no debug"
39 #define __WX_BO_UNICODE "Unicode"
41 #define __WX_BO_UNICODE "ANSI"
44 // GCC and Intel C++ share same C++ ABI, check if compiler versions are
46 #if (defined(__GNUG__) || defined(__INTEL_COMPILER) && \
47 defined(__GXX_ABI_VERSION))
48 #define __WX_BO_COMPILER \
49 ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
51 #define __WX_BO_COMPILER
54 // This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
55 #define WX_BUILD_OPTIONS_SIGNATURE \
56 __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
57 " (" __WX_BO_DEBUG "," __WX_BO_UNICODE __WX_BO_COMPILER ")"
61 // Use this macro to check build options. Adding it to a file in DLL will
62 // ensure that the DLL checks build options in same way IMPLEMENT_APP() does.
63 #define WX_CHECK_BUILD_OPTIONS(libName) \
64 static bool wxCheckBuildOptions() \
66 wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
70 static bool gs_buildOptionsCheck = wxCheckBuildOptions();
72 #endif // _WX_BUILD_H_