Explicitly compile external WX in C++11 mode.

Apparently an update to gcc now requires this.
This commit is contained in:
Rohit Nirmal 2014-11-14 22:15:03 +00:00
parent 68c5758151
commit 12b7600ae7
1 changed files with 2 additions and 1 deletions

View File

@ -862,6 +862,7 @@ set(SRCS
${SRCS_GENERIC}) ${SRCS_GENERIC})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
add_definitions(-D__WXOSX_COCOA__) add_definitions(-D__WXOSX_COCOA__)
set(SRCS set(SRCS
${SRCS} ${SRCS}
@ -895,6 +896,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
${PANGOCAIRO_LIBRARIES} ${PANGOCAIRO_LIBRARIES}
${GTK2_LIBRARIES}) ${GTK2_LIBRARIES})
else() else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_definitions(-D__WXMSW__) add_definitions(-D__WXMSW__)
set(SRCS set(SRCS
${SRCS} ${SRCS}
@ -904,7 +906,6 @@ endif()
add_definitions(-DWXBUILDING) add_definitions(-DWXBUILDING)
# wxWidgets warnings are not our problem. # wxWidgets warnings are not our problem.
add_definitions(-w) add_definitions(-w)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS) enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS)
add_library(wx STATIC ${PNG_SRCS} ${SRCS}) add_library(wx STATIC ${PNG_SRCS} ${SRCS})