]>
Commit | Line | Data |
---|---|---|
090a6d7a VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/build.h | |
2a7c7605 VS |
3 | // Purpose: Runtime build options checking |
4 | // Author: Vadim Zeitlin, Vaclav Slavik | |
090a6d7a VZ |
5 | // Modified by: |
6 | // Created: 07.05.02 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwindows.org> | |
371a5b4e | 9 | // Licence: wxWindows licence |
090a6d7a VZ |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_BUILD_H_ | |
13 | #define _WX_BUILD_H_ | |
14 | ||
15 | #include "wx/version.h" | |
16 | ||
17 | // ---------------------------------------------------------------------------- | |
2a7c7605 | 18 | // WX_BUILD_OPTIONS_SIGNATURE |
090a6d7a VZ |
19 | // ---------------------------------------------------------------------------- |
20 | ||
2a7c7605 VS |
21 | #define __WX_BO_STRINGIZE(x) #x |
22 | ||
23 | #if (wxMINOR_VERSION % 2) == 0 | |
24 | #define __WX_BO_VERSION(x,y,z) \ | |
25 | __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) | |
26 | #else | |
27 | #define __WX_BO_VERSION(x,y,z) \ | |
28 | __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z) | |
29 | #endif | |
30 | ||
090a6d7a | 31 | #ifdef __WXDEBUG__ |
2a7c7605 | 32 | #define __WX_BO_DEBUG "debug" |
090a6d7a | 33 | #else |
2a7c7605 | 34 | #define __WX_BO_DEBUG "no debug" |
090a6d7a VZ |
35 | #endif |
36 | ||
2a7c7605 VS |
37 | #if wxUSE_UNICODE |
38 | #define __WX_BO_UNICODE "Unicode" | |
39 | #else | |
40 | #define __WX_BO_UNICODE "ANSI" | |
41 | #endif | |
42 | ||
43 | // This macro is passed as argument to wxConsoleApp::CheckBuildOptions() | |
44 | #define WX_BUILD_OPTIONS_SIGNATURE \ | |
45 | __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \ | |
46 | " (" __WX_BO_DEBUG "," __WX_BO_UNICODE ")" | |
090a6d7a | 47 | |
090a6d7a | 48 | |
090a6d7a | 49 | |
2a7c7605 VS |
50 | // Use this macro to check build options. Adding it to a file in DLL will |
51 | // ensure that the DLL checks build options in same way IMPLEMENT_APP() does. | |
52 | #define WX_CHECK_BUILD_OPTIONS(libName) \ | |
53 | static bool wxCheckBuildOptions() \ | |
54 | { \ | |
55 | wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \ | |
56 | libName); \ | |
57 | return true; \ | |
58 | }; \ | |
59 | static bool gs_buildOptionsCheck = wxCheckBuildOptions(); | |
090a6d7a VZ |
60 | |
61 | #endif // _WX_BUILD_H_ |