From ea4985f8f06bf501c8c066e0159944995fe2f7cb Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Tue, 17 Mar 2026 03:58:43 -0600 Subject: [PATCH 1/2] Fix debug build for Windows and ortools per email 3/16/2026 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c39a4ac..052954df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,9 +72,9 @@ if (UNIX) find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () else () - set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) +# set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) # set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) - find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) +# find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () if (wxWidgets_FOUND) From a69a486e23b695f33c3f505d4d8fc4ac4a16a086 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Thu, 19 Mar 2026 02:25:47 -0600 Subject: [PATCH 2/2] Update CMakeLists.txt for Windows runners --- CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 052954df..c201f6bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,39 @@ else () # set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) # set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) # find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Debug and Release Builds Configured" FORCE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20") + # for linking to Release build of ortools + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") + # Get the current debug flags and remove the /D_DEBUG option. + string(REPLACE "/D_DEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + # following does not force release libraries for wxWidgets using find_package + #set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG RELEASE) + + set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) + find_package(wxWidgets QUIET REQUIRED xrc webview stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + + # message("All wxWidgets: " ${wxWidgets_LIBRARIES}) + set(FOUND "false") + foreach(lib ${wxWidgets_LIBRARIES}) + string(FIND ${lib} "optimized" INDEX) + string(FIND ${lib} "debug" INDEX2) + string(FIND ${lib} "wxWidgets" INDEX3) + if (INDEX GREATER_EQUAL 0) # skip once + set(FOUND "true") + continue() + elseif((INDEX2 LESS 0) AND (INDEX3 LESS 0)) + set(FOUND "true") + endif() + if (${FOUND} STREQUAL "true") + set(FOUND "false") + message("lib: ${lib}") + list(APPEND WX_LIBS_LIST ${lib}) + endif() + endforeach() + + list(JOIN WX_LIBS_LIST ";" wxWidgets_LIBRARIES) +# message("Link Libraries for wxWidgets: ${wxWidgets_LIBRARIES}") endif () if (wxWidgets_FOUND)