From 3a527664260a0c4366c0b41a820d13aa00153511 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Tue, 9 Jan 2024 09:47:49 -0500 Subject: [PATCH] cmake: treat snippet warning as error A pristine build is needed when snippets are changed. Currently this only triggers a warning which can easily be missed. Signed-off-by: Andriy Gelman --- cmake/modules/extensions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/extensions.cmake b/cmake/modules/extensions.cmake index 5d9d16384e0e48..14239f34a15d02 100644 --- a/cmake/modules/extensions.cmake +++ b/cmake/modules/extensions.cmake @@ -3328,7 +3328,7 @@ function(zephyr_check_cache variable) # without cleaning first if(cli_argument) if(NOT ((CACHED_${variable} STREQUAL cli_argument) OR (${variable}_DEPRECATED STREQUAL cli_argument))) - message(WARNING "The build directory must be cleaned pristinely when " + message(FATAL_ERROR "The build directory must be cleaned pristinely when " "changing ${variable_text},\n" "Current value=\"${CACHED_${variable}}\", " "Ignored value=\"${cli_argument}\"")