From 688c818c2f3fe2aeb620d7c3034c2027482d0405 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Wed, 26 Nov 2025 10:19:46 +0100 Subject: [PATCH] Avoid cmake error when variable is not defined --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 330754458eb..9046a4746f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,7 +333,10 @@ endforeach() # Only run validation for the main project, not subprojects like bootloader idf_build_get_property(bootloader_build BOOTLOADER_BUILD) idf_build_get_property(esp_tee_build ESP_TEE_BUILD) -if(NOT $ENV{ESP_IDF_DISABLE_COMPONENT_VALIDATION} AND NOT bootloader_build AND NOT esp_tee_build) +if((NOT DEFINED ENV{ESP_IDF_DISABLE_COMPONENT_VALIDATION} + OR "$ENV{ESP_IDF_DISABLE_COMPONENT_VALIDATION}" STREQUAL "" + OR "$ENV{ESP_IDF_DISABLE_COMPONENT_VALIDATION}" STREQUAL "0") + AND NOT bootloader_build AND NOT esp_tee_build) include("${CMAKE_CURRENT_LIST_DIR}/tools/cmake/component_validation.cmake") __component_validation_run_checks() endif()