From Simon Hammett, moved VS #prgama warning disabling from include/osg/Export to CMakeList.txt.

This commit is contained in:
Robert Osfield 2008-11-14 18:22:01 +00:00
parent 5d975da41a
commit 453bbc8608
2 changed files with 5 additions and 11 deletions

View File

@ -191,6 +191,11 @@ IF(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF(WIN32_USE_MP) ENDIF(WIN32_USE_MP)
# turn off various warnings
foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd${warning}")
endforeach(warning)
# More MSVC specific compilation flags # More MSVC specific compilation flags
ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)

View File

@ -19,17 +19,6 @@
// well placed for compatibility with future versions. // well placed for compatibility with future versions.
#define USE_DEPRECATED_API #define USE_DEPRECATED_API
#if defined(_MSC_VER)
#pragma warning( disable : 4244 )
#pragma warning( disable : 4251 )
#pragma warning( disable : 4267 )
#pragma warning( disable : 4275 )
#pragma warning( disable : 4290 )
#pragma warning( disable : 4786 )
#pragma warning( disable : 4305 )
#pragma warning( disable : 4996 )
#endif
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
# if defined( OSG_LIBRARY_STATIC ) # if defined( OSG_LIBRARY_STATIC )
# define OSG_EXPORT # define OSG_EXPORT