Use C++11 by default in CMake build under macOS

Force the use of C++11 standard on macOS to avoid C++11 specific
warnings with clang.

Closes https://github.com/wxWidgets/wxWidgets/pull/2374
This commit is contained in:
Pedro Vicente 2021-05-19 19:14:38 -04:00 committed by Vadim Zeitlin
parent 9e34269191
commit 26795b7432

View File

@ -47,6 +47,8 @@ if(NOT MSVC OR MSVC_VERSION GREATER 1800)
# support setting the C++ standard, present it an option to the user # support setting the C++ standard, present it an option to the user
if(DEFINED CMAKE_CXX_STANDARD) if(DEFINED CMAKE_CXX_STANDARD)
set(wxCXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) set(wxCXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD})
elseif(APPLE)
set(wxCXX_STANDARD_DEFAULT 11)
else() else()
set(wxCXX_STANDARD_DEFAULT COMPILER_DEFAULT) set(wxCXX_STANDARD_DEFAULT COMPILER_DEFAULT)
endif() endif()