+if(MINGW)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+
+ # gcc options for release and debug builds
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
+
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+
+else(MINGW)
+ # Assume a Microsoft Visual C++ compiler
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:wchar_t-")
+endif(MINGW)