From 56d3dd0e4caefaecce613966f530017139482cb5 Mon Sep 17 00:00:00 2001 From: Sam Brkopac Date: Thu, 10 Dec 2020 14:00:11 -0700 Subject: [PATCH] updated cmake to properly disable debug iterators on windows --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5182fd6da..54eda0a32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,7 @@ ELSEIF(APPLE) # OSX >= 10.5 uses Cocoa windowing system, otherwise Carbon IF(OSG_OSX_VERSION VERSION_LESS 10.5) SET(OSG_WINDOWING_SYSTEM "Carbon" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.") - SET(OSG_WINDOWING_SYSTEM_CARBON ON INTERNAL "use Carbon (apple; 32 bit only)") + SET(OSG_WINDOWING_SYSTEM_CARBON ON INTERNAL "use Carbon (apple; 32 bit only)") ELSE() SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.") ENDIF() @@ -375,7 +375,9 @@ IF(WIN32 AND NOT ANDROID) OPTION(MSVC_DISABLE_CHECKED_ITERATORS "Set to ON to disable Visual C++ checked iterators. If you do this you must ensure that every other project in your solution and all dependencies are compiled with _SECURE_SCL=0." OFF) MARK_AS_ADVANCED(MSVC_DISABLE_CHECKED_ITERATORS) IF(MSVC_DISABLE_CHECKED_ITERATORS) + ADD_DEFINITIONS(-D_ITERATOR_DEBUG_LEVEL=0) # this supercedes _SECURE_SCL and _HAS_ITERATOR_DEBUGGING in VS2010 and forward ADD_DEFINITIONS(-D_SECURE_SCL=0) + ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) ENDIF(MSVC_DISABLE_CHECKED_ITERATORS) OPTION(MSVC_USE_DEFAULT_STACK_SIZE "Set to ON to use the default Visual C++ stack size. CMake forces a high stack size by default, which can cause problems for applications with large number of threads." OFF)