Fix: mingw: undefined reference rand_r
Exclude mingw from ENABLE_OPTIMIZATIONS.
@@ -64,6 +64,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (WIN32)
message (STATUS "mingw detected")
+ set (ENABLE_OPTIMIZATIONS OFF CACHE BOOL "Turn on optimizations that trade memory for speed" FORCE)
else(WIN32)
#not supported by icc:
set (EXTRA_FLAGS "${EXTRA_FLAGS} -Wno-deprecated-declarations")
