From a8238e95e5a17544a9a5d63224569f72245f1f22 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Tue, 9 Jun 2026 03:00:32 -0600 Subject: [PATCH 1/4] Add pre build command to Windows to remove potentially stale json files #2208 --- api/api_autogen/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/api_autogen/CMakeLists.txt b/api/api_autogen/CMakeLists.txt index 628e168fdd..6d90532086 100644 --- a/api/api_autogen/CMakeLists.txt +++ b/api/api_autogen/CMakeLists.txt @@ -234,6 +234,12 @@ if (MSVC) ) endforeach( file_i ) + add_custom_command( + TARGET export_config + PRE_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/library/defaults + ) add_custom_command( TARGET export_config From f1c313e3f54964891f51fd2c89086dd68fe7782d Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Tue, 16 Jun 2026 01:06:33 -0600 Subject: [PATCH 2/4] Address issue reported in #2209. Do not delete files when debug export_config is built --- api/api_autogen/CMakeLists.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/api/api_autogen/CMakeLists.txt b/api/api_autogen/CMakeLists.txt index 6d90532086..7e35ba8fca 100644 --- a/api/api_autogen/CMakeLists.txt +++ b/api/api_autogen/CMakeLists.txt @@ -234,18 +234,21 @@ if (MSVC) ) endforeach( file_i ) - add_custom_command( - TARGET export_config - PRE_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/library/defaults - ) - - add_custom_command( - TARGET export_config - POST_BUILD - COMMAND cmd /C $<$:${EXPORT_RUN}> - ) + if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + add_custom_command( + TARGET export_config + PRE_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/library/defaults + ) + + add_custom_command( + TARGET export_config + POST_BUILD + COMMAND cmd /C $<$:${EXPORT_RUN}> + ) + endif() + else() if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") add_custom_command( From 9781b0f23c7f939420e98cd655e8998ff0589afe Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Tue, 16 Jun 2026 02:30:20 -0600 Subject: [PATCH 3/4] Fix failing windows runner from windows-latest to window-2022 for vs2022 support --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c307f05024..8bd8ef2a6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,7 +210,7 @@ jobs: build-windows: - runs-on: windows-latest + runs-on: windows-2022 strategy: matrix: python-version: [ '3.10' ] From d4be59d2ec7e7542011595ecef57092a1d03e05e Mon Sep 17 00:00:00 2001 From: Brian Mirletz Date: Tue, 16 Jun 2026 09:48:09 -0600 Subject: [PATCH 4/4] Delete the files instead of the whole folder --- api/api_autogen/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api_autogen/CMakeLists.txt b/api/api_autogen/CMakeLists.txt index 7e35ba8fca..6c2f3260cf 100644 --- a/api/api_autogen/CMakeLists.txt +++ b/api/api_autogen/CMakeLists.txt @@ -239,7 +239,7 @@ if (MSVC) TARGET export_config PRE_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/library/defaults + ARGS -E rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/library/defaults/*.* ) add_custom_command(