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
This commit is contained in:
Vadim Zeitlin
2009-11-22 11:24:09 +00:00
parent 7d4911333f
commit e55e621ec5

View File

@@ -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_ */