From 26795b7432e83fabdfcc621607396c292e217cb8 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Date: Wed, 19 May 2021 19:14:38 -0400 Subject: [PATCH] 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 --- build/cmake/options.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index 5fee034106..b67bad3e20 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -47,6 +47,8 @@ if(NOT MSVC OR MSVC_VERSION GREATER 1800) # support setting the C++ standard, present it an option to the user if(DEFINED CMAKE_CXX_STANDARD) set(wxCXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) + elseif(APPLE) + set(wxCXX_STANDARD_DEFAULT 11) else() set(wxCXX_STANDARD_DEFAULT COMPILER_DEFAULT) endif()