From Sherman Wilcox, "Here is a patch for cmakelists.txt to add support for the /MP option

in Microsoft compilers as discussed in osg-users. There is now an
advanced option called WIN32_USE_MP (which defaults to OFF) that will
enable the /MP switch for all builds. I tucked this code block safely
within a IF(WIN32) branch."
This commit is contained in:
Robert Osfield 2008-04-11 13:03:02 +00:00
parent 98a2289a59
commit 52c9acade3

View File

@ -120,6 +120,14 @@ ENDIF(OSG_GLU_TESS_CALLBACK_TRIPLEDOT)
IF(WIN32) IF(WIN32)
# This option is to enable the /MP switch for Visual Studio 2005 and above compilers
OPTION(WIN32_USE_MP "Set to ON to build OpenSceneGraph with the /MP option (Visual Studio 2005 and above)." OFF)
MARK_AS_ADVANCED(WIN32_USE_MP)
IF(WIN32_USE_MP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF(WIN32_USE_MP)
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)
#needed for net plugin #needed for net plugin
@ -459,7 +467,6 @@ IF(APPLE)
ENDIF(APPLE) ENDIF(APPLE)
OPTION(BUILD_REF_DOCS "Build OpenSceneGraph reference documentation using doxygen (use: make DoxygenDoc)" OFF) OPTION(BUILD_REF_DOCS "Build OpenSceneGraph reference documentation using doxygen (use: make DoxygenDoc)" OFF)
IF(BUILD_REF_DOCS) IF(BUILD_REF_DOCS)