From 4c03e0062b075d13cb86e14f83748da3044be993 Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Sat, 17 Oct 2026 22:35:27 +0200 Subject: [PATCH] [CI] Detect 64-bit Windows NSIS builds via pointer size, not generator platform (#7573) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CMAKE_GENERATOR_PLATFORM is Visual-Studio-only and stays empty under the Ninja generator that Windows CI switched to in #7380, so TRICE_IS_64_BIT was always 0 and every Windows artifact was mislabeled 32-bit. That fired the installer's 'installing a 32-bit version on a 64-bit system' warning and routed a genuinely 64-bit build into Program Files (x86) with the 32-bit registry view. Use CMAKE_SIZEOF_VOID_P, which reflects the actual target architecture for every generator (same test FindVCredistRuntime.cmake already uses). Co-authored-by: Lukas BrĂ¼bach --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bee47972c..87f1c746a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -327,7 +327,7 @@ if(UNIX) endif() elseif(WIN32) set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR}) - if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "(x64)") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(TRICE_IS_64_BIT 1) else() set(TRICE_IS_64_BIT 0)