Prior to moving to sysbuild, we were dynamically settings a CONFIG_ variable in our `CMakeLists.txt` based on the board passed to west. And this was working fine.
if(BOARD MATCHES "^ourboard")
set(CONFIG_MEMFAULT_NCS_HW_VERSION "\"A9.1\"" CACHE INTERNAL "")
elseif(BOARD MATCHES "^nrf9151dk")
set(CONFIG_MEMFAULT_NCS_HW_VERSION "\"nRF9151DK\"" CACHE INTERNAL "")
else()
message(FATAL_ERROR "No hardware BOARD has been set for this build.")
endif()