+
+ # Disable iterator debugging on WINDOWS to avoid runtime error during checking iterators
+ # _SECURE_SCL
+ # If defined as 1, unsafe iterator use causes a runtime error.
+ # If defined as 0, checked iterators are disabled.
+ # The default value for _SECURE_SCL is 1
+ # _SECURE_SCL_THROWS
+ # If defined as 1, an out of range iterator use causes an exception at runtime.
+ # If defined as 0, the program is terminated by calling invalid_parameter.
+ # The default value for _SECURE_SCL_THROWS is 0
+
+ ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
+
+ # The symbol _HAS_ITERATOR_DEBUGGING can be used to turn off the iterator debugging feature in a debug build
+ # If defined as 1, iterator debugging is enabled.
+ # If defined as 0, iterator debugging is disabled.
+ # The default value for _HAS_ITERATOR_DEBUGGING is 1
+
+ IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)
+ ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")