SET(CMAKE_BUILD_TYPE Release)
ENDIF(NOT CMAKE_BUILD_TYPE)
+## Define the log level according to the build type
+IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "Debug")
+ SET(PYLOGLEVEL DEBUG)
+ELSE()
+ SET(PYLOGLEVEL WARNING)
+ENDIF()
+
## Make all warnings errors on non-windows platforms
# CURRENTLY DISABLED
IF(NOT (WIN32 OR APPLE))
SET(PLATFORM_LIBS dl) # Dynamic loading (dlopen, dlsym)
ENDIF()
+## define _DEBUG_ macro
+IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ ADD_DEFINITIONS(-D_DEBUG_)
+ENDIF()
+
## Apple specific:
IF(APPLE)
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
# because default is clang(llvm) with mountain lion at least
ENDIF()
-