OgreHeaderPrefix.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*-------------------------------------------------------------------------
  2. This source file is a part of OGRE
  3. (Object-oriented Graphics Rendering Engine)
  4. For the latest info, see http://www.ogre3d.org/
  5. Copyright (c) 2000-2011 Torus Knot Software Ltd
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. THE SOFTWARE
  21. -------------------------------------------------------------------------*/
  22. #ifndef __OgreHeaderPrefix_H__
  23. #define __OgreHeaderPrefix_H__
  24. #include "OgrePrerequisites.h"
  25. #if OGRE_COMPILER == OGRE_COMPILER_MSVC
  26. // Save warnings state
  27. # pragma warning (push)
  28. // Turn off warnings generated by long std templates
  29. // This warns about truncation to 255 characters in debug/browse info
  30. # pragma warning (disable : 4786)
  31. // Turn off warnings generated by long std templates
  32. // This warns about truncation to 255 characters in debug/browse info
  33. # pragma warning (disable : 4503)
  34. // disable: "<type> needs to have dll-interface to be used by clients'
  35. // Happens on STL member variables which are not public therefore is ok
  36. # pragma warning (disable : 4251)
  37. // disable: "non dll-interface class used as base for dll-interface class"
  38. // Happens when deriving from Singleton because bug in compiler ignores
  39. // template export
  40. # pragma warning (disable : 4275)
  41. // disable: "C++ Exception Specification ignored"
  42. // This is because MSVC 6 did not implement all the C++ exception
  43. // specifications in the ANSI C++ draft.
  44. # pragma warning( disable : 4290 )
  45. // disable: "no suitable definition provided for explicit template
  46. // instantiation request" Occurs in VC7 for no justifiable reason on all
  47. // #includes of Singleton
  48. # pragma warning( disable: 4661)
  49. // disable: deprecation warnings when using CRT calls in VC8
  50. // These show up on all C runtime lib code in VC8, disable since they clutter
  51. // the warnings with things we may not be able to do anything about (e.g.
  52. // generated code from nvparse etc). I doubt very much that these calls
  53. // will ever be actually removed from VC anyway, it would break too much code.
  54. # pragma warning( disable: 4996)
  55. // disable: "conditional expression constant", always occurs on
  56. // OGRE_MUTEX_CONDITIONAL when no threading enabled
  57. # pragma warning (disable : 201)
  58. // disable: "unreferenced formal parameter"
  59. // Many versions of VC have bugs which generate this error in cases where they shouldn't
  60. # pragma warning (disable : 4100)
  61. #endif
  62. #endif