Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wxwidgets] CMake re-run must not change libs #24499

Merged
merged 3 commits into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ports/wxwidgets/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ if(USE_WXRC)
message(FATAL_ERROR "Failed to run wxWidgets_wxrc_EXECUTABLE (${wxWidgets_wxrc_EXECUTABLE})")
endif()
endif()

set(PRINT_VARS "" CACHE STRING "Variables to print at the end of configuration")
foreach(var IN LISTS PRINT_VARS)
message(STATUS "${var}:=${${var}}")
endforeach()
1 change: 1 addition & 0 deletions ports/wxwidgets/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
_find_package(${ARGS})
# Reset for regular lookup
unset(wxWidgets_CONFIGURATION CACHE)
unset(wxWidgets_USE_REL_AND_DBG CACHE)
set(WX_CONFIGURATION_LIST "")
set(wxWidgets_LIB_DIR "${wxWidgets_ROOT_DIR}/lib" CACHE INTERNAL "")
else()
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-semver": "3.1.5",
"port-version": 10,
"port-version": 11,
"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
21 changes: 21 additions & 0 deletions scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,28 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS OPTIONS

vcpkg_cmake_configure(
SOURCE_PATH "${CURRENT_INSTALLED_DIR}/share/wxwidgets/example"
DISABLE_PARALLEL_CONFIGURE # Need separate dbg log for following test
OPTIONS
${OPTIONS}
-DCMAKE_CONFIG_RUN=1
"-DPRINT_VARS=CMAKE_CONFIG_RUN;wxWidgets_LIBRARIES"
)
vcpkg_cmake_build()

if(NOT VCPKG_BUILD_TYPE)
# Check that debug libs are still used after re-configuration, #24489
set(config_log "config-${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND "${CMAKE_COMMAND}" -DCMAKE_CONFIG_RUN=2 .
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
LOGNAME "${config_log}-2"
)
file(STRINGS "${CURRENT_BUILDTREES_DIR}/${config_log}-out.log" expected REGEX "wxWidgets_LIBRARIES:=")
file(STRINGS "${CURRENT_BUILDTREES_DIR}/${config_log}-2-out.log" actual REGEX "wxWidgets_LIBRARIES:=")
if(NOT actual STREQUAL expected)
message(FATAL_ERROR "wxWidgets libraries changed after CMake re-run\n"
"actual:\n${actual}\n"
"expected:\n ${expected}\n"
)
endif()
endif()
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7530,7 +7530,7 @@
},
"wxwidgets": {
"baseline": "3.1.5",
"port-version": 10
"port-version": 11
},
"x-plane": {
"baseline": "3.0.3",
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": "3f891e383d71c7665ba49dcc254d8b2094c00c2b",
"version-semver": "3.1.5",
"port-version": 11
},
{
"git-tree": "99203047a716a1b39d06fb93c48daebb4b184141",
"version-semver": "3.1.5",
Expand Down