Fix compile issue in mingw32
This commit is contained in:
parent
a914d31afb
commit
487dafb8c0
|
@ -125,9 +125,15 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(CPP2011_FLAGS "-std=gnu++0x")
|
||||||
|
else()
|
||||||
|
set(CPP2011_FLAGS "-std=c++0x")
|
||||||
|
endif()
|
||||||
|
|
||||||
# gcc compile flags
|
# gcc compile flags
|
||||||
set(WARNS_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-variable")
|
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_DEBUG "-O0 -g")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-omit-frame-pointer")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||||
|
|
Loading…
Reference in New Issue