From 897673db64c0fafaba94364b9a87ee3498ca73e6 Mon Sep 17 00:00:00 2001 From: PB Date: Mon, 8 Aug 2022 13:26:51 +0200 Subject: [PATCH] Set default build compatibility in CMake builds to 3.2 Remove "2.8" and "3.1" from wxBUILD_COMPATIBILITY options. Add "3.2" to wxBUILD_COMPATIBILITY options and set it as its default value. Closes #22715. --- build/cmake/init.cmake | 8 ++++---- build/cmake/main.cmake | 2 +- build/cmake/options.cmake | 2 +- docs/doxygen/overviews/cmake.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index e3cb52907a..510c7f8847 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -94,11 +94,11 @@ elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID} endif() endif() -if(wxBUILD_COMPATIBILITY VERSION_LESS 3.2) - set(WXWIN_COMPATIBILITY_3_0 ON) -endif() -if(wxBUILD_COMPATIBILITY VERSION_LESS 3.3) +if(NOT wxBUILD_COMPATIBILITY STREQUAL "NONE") set(WXWIN_COMPATIBILITY_3_2 ON) + if(wxBUILD_COMPATIBILITY VERSION_LESS 3.2) + set(WXWIN_COMPATIBILITY_3_0 ON) + endif() endif() if(wxUSE_NO_RTTI) diff --git a/build/cmake/main.cmake b/build/cmake/main.cmake index 6e8e869f32..c0babe9d86 100644 --- a/build/cmake/main.cmake +++ b/build/cmake/main.cmake @@ -83,5 +83,5 @@ message(STATUS "Configured wxWidgets ${wxVERSION} for ${CMAKE_SYSTEM} Should wxWidgets be compiled into single library? ${wxBUILD_MONOLITHIC} Should wxWidgets be linked as a shared library? ${wxBUILD_SHARED} Should wxWidgets support Unicode? ${wxUSE_UNICODE} - What wxWidgets compatibility level should be used? ${wxBUILD_COMPATIBILITY}" + Which wxWidgets API compatibility should be used? ${wxBUILD_COMPATIBILITY}" ) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index 02dc4aca6f..64ee4a3422 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -20,7 +20,7 @@ wx_option(wxBUILD_PRECOMP "Use precompiled headers" ON STRINGS ON OFF COTIRE) mark_as_advanced(wxBUILD_PRECOMP) wx_option(wxBUILD_INSTALL "Create install/uninstall target for wxWidgets") wx_option(wxBUILD_COMPATIBILITY - "enable compatibilty with earlier wxWidgets versions" 3.0 STRINGS 2.8 3.0 3.1) + "enable compatibilty with earlier wxWidgets versions" 3.2 STRINGS 3.0 3.2 NONE) mark_as_advanced(wxBUILD_COMPATIBILITY) # Allow user specified setup.h folder set(wxBUILD_CUSTOM_SETUP_HEADER_PATH "" CACHE PATH "Include path containing custom wx/setup.h") diff --git a/docs/doxygen/overviews/cmake.md b/docs/doxygen/overviews/cmake.md index 0209f88025..3c4ee8ca1c 100644 --- a/docs/doxygen/overviews/cmake.md +++ b/docs/doxygen/overviews/cmake.md @@ -69,7 +69,7 @@ wxBUILD_TESTS | STRING | OFF | CONSOLE_ONLY, ALL or OFF wxBUILD_SAMPLES | STRING | OFF | SOME, ALL or OFF wxBUILD_DEMOS | BOOL | OFF | Build demo applications wxUSE_GUI | BOOL | ON | Build the UI libraries -wxBUILD_COMPATIBILITY | STRING | 3.0 | 2.8, 3.0 or 3.1 API compatibility +wxBUILD_COMPATIBILITY | STRING | 3.2 | Enable API compatibility with 3.0, 3.2 or neither ("NONE") wxBUILD_PRECOMP | BOOL | ON | Use precompiled headers wxBUILD_MONOLITHIC | BOOL | OFF | Build a single library