Skip to content

Commit

Permalink
[wxwidgets] Remove debug asserts from Release build. (#25240)
Browse files Browse the repository at this point in the history
* [wxWidgets] Remove debug asserts from Release build.

Currently when building wxWidgets in Release mode, the debug asserts are enabled.
This fixes this issue by providing a necessary define to disable them.

Ref: https://docs.wxwidgets.org/3.1.6/group__group__funcmacro__debug.html

[wxCharts, vcpkg-ci-wxwidgets] Update ports to include fix for wxWidgets release build with debug asserts off when building a dynamic/shared library.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>

* Update wxcharts.json

Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
  • Loading branch information
AenBleidd and LilyWangLL authored Jun 16, 2022
1 parent dc6f878 commit 6e16931
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 6 deletions.
6 changes: 4 additions & 2 deletions ports/wxcharts/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wxIshiko/wxCharts
REF c7c7eb4c4132eeb83f25546b1b981dc61e5c188f
SHA512 f46cf467b356e2ffa46db020de42f8aca9beab801e2ade50f7e75650bba9bc83c641702dcd5ee45e82425b96d4371b82e7f16dce3077050a86ba696ed5c326de
REF 070e1d6084623185c7337226fa562b1e3a772e3d
SHA512 4c52e4ad6d3c4ba496aad7e654ee75ddd9009aadc44be37fc64f3e3ac56001a7e9728f7fdd0c78f8261bff0bf8a6748f8a7649cb160ca37c2d686530c161c2f6
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_RELEASE
-DwxBUILD_DEBUG_LEVEL=0
)

vcpkg_cmake_install()
Expand Down
2 changes: 1 addition & 1 deletion ports/wxcharts/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wxcharts",
"version-date": "2022-04-22",
"version-date": "2022-06-16",
"description": "Chart controls for the wxWidgets cross-platform GUI library",
"homepage": "https://www.wxishiko.com/wxCharts",
"license": "MIT",
Expand Down
5 changes: 5 additions & 0 deletions ports/wxwidgets/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ cmake_minimum_required(VERSION 3.7)

project(wxwidgets-example)

option(wxBUILD_DEBUG_LEVEL "Debug Level" Default)
if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}")
endif()

add_executable(main WIN32 popup.cpp)

find_package(wxWidgets REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions ports/wxwidgets/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ vcpkg_cmake_configure(
# The minimum cmake version requirement for Cotire is 2.8.12.
# however, we need to declare that the minimum cmake version requirement is at least 3.1 to use CMAKE_PREFIX_PATH as the path to find .pc.
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON
OPTIONS_RELEASE
-DwxBUILD_DEBUG_LEVEL=0
)

vcpkg_cmake_install()
Expand Down
2 changes: 1 addition & 1 deletion ports/wxwidgets/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wxwidgets",
"version": "3.1.6",
"port-version": 1,
"port-version": 2,
"description": [
"Widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. ",
"Set WXWIDGETS_USE_STL in a custom triplet to build with the wxUSE_STL build option.",
Expand Down
2 changes: 2 additions & 0 deletions scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ vcpkg_cmake_configure(
${OPTIONS}
-DCMAKE_CONFIG_RUN=1
"-DPRINT_VARS=CMAKE_CONFIG_RUN;wxWidgets_LIBRARIES"
OPTIONS_RELEASE
-DwxBUILD_DEBUG_LEVEL=0
)
vcpkg_cmake_build()

Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7621,12 +7621,12 @@
"port-version": 0
},
"wxcharts": {
"baseline": "2022-04-22",
"baseline": "2022-06-16",
"port-version": 0
},
"wxwidgets": {
"baseline": "3.1.6",
"port-version": 1
"port-version": 2
},
"x-plane": {
"baseline": "3.0.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/w-/wxcharts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0d4c30893a28468249d63c0f4c1a1a9e231ac817",
"version-date": "2022-06-16",
"port-version": 0
},
{
"git-tree": "b1e9c16349a281b499d1ff50cdee4dd21c4aafec",
"version-date": "2022-04-22",
Expand Down
5 changes: 5 additions & 0 deletions versions/w-/wxwidgets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "27a68f45cbdc9ab88864c353c7a8b91f76153509",
"version": "3.1.6",
"port-version": 2
},
{
"git-tree": "793b49ce7710b440be0a451354614e282e6fc9fa",
"version": "3.1.6",
Expand Down

0 comments on commit 6e16931

Please sign in to comment.