Fix compile issue in mingw32

This commit is contained in:
Eduardo Bart 2012-07-29 17:17:48 -03:00
parent a914d31afb
commit 487dafb8c0
1 changed files with 7 additions and 1 deletions

View File

@ -125,9 +125,15 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
if(WIN32)
set(CPP2011_FLAGS "-std=gnu++0x")
else()
set(CPP2011_FLAGS "-std=c++0x")
endif()
# gcc compile flags
set(WARNS_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-variable")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNS_FLAGS} ${ARCH_FLAGS} -std=c++11 -pipe")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNS_FLAGS} ${ARCH_FLAGS} ${CPP2011_FLAGS} -pipe")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")