From 52c9acade32d6517b7ece4f05710674afe3ab678 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 11 Apr 2008 13:03:02 +0000 Subject: [PATCH] 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." --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bd1527e6..6e96d5242 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,14 @@ ENDIF(OSG_GLU_TESS_CALLBACK_TRIPLEDOT) 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_CRT_SECURE_NO_DEPRECATE) #needed for net plugin @@ -459,7 +467,6 @@ IF(APPLE) ENDIF(APPLE) - OPTION(BUILD_REF_DOCS "Build OpenSceneGraph reference documentation using doxygen (use: make DoxygenDoc)" OFF) IF(BUILD_REF_DOCS)