From e55e621ec5f0307cfd46e14af47ec186c4f1034d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 22 Nov 2009 11:24:09 +0000 Subject: [PATCH] Define wxNO_RTTI if RTTI support is disabled for g++ or MSVC. For g++ it could have been possible to define wxNO_RTTI in configure itself but it seems better/simpler/more maintainable to do it in C++ code. As for MSVC, we already define wxNO_RTTI correctly if build/msw/makefile.vc is used but not if (modified or rebaked) project files are used and detecting RTTI support in the code is the only way to fix it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/platform.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/wx/platform.h b/include/wx/platform.h index 957c26b2ae..33770bcb42 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -825,4 +825,25 @@ #define POSSEC_FILEFN #endif // __WXPALMOS5__ +/* + Optionally supported C++ features. + */ + +/* + RTTI: if it is disabled in build/msw/makefile.* then this symbol will + already be defined but it's also possible to do it from configure (with + g++) or by editing project files with MSVC so test for it here too. + */ +#ifndef wxNO_RTTI +# ifdef __GNUG__ +# ifndef __GXX_RTTI +# define wxNO_RTTI +# endif +# elif defined(_MSC_VER) +# ifndef _CPPRTTI +# define wxNO_RTTI +# endif +# endif +#endif // wxNO_RTTI + #endif /* _WX_PLATFORM_H_ */ -- 2.45.2