fix(cmakev2/idf): target consistency check with sdkconfig

Currently, the check is based on the existence of sdkconfig, but there
may be situations where sdkconfig exists without containing
CONFIG_IDF_TARGET. Perform a target consistency check only if the target
is identified in the main sdkconfig file.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-09-11 08:42:21 +02:00
parent d1a69f40da
commit de26190732
+1 -1
View File
@@ -238,7 +238,7 @@ function(__init_idf_target)
endif()
# Verify that the chosen target aligns with the sdkconfig.
if(EXISTS "${sdkconfig}")
if(sdkconfig_target AND "${sdkconfig_file}" STREQUAL "${sdkconfig}")
if("$ENV{_IDF_PY_SET_TARGET_ACTION}" STREQUAL "1")
idf_dbg("The target consistency check for the target specified in ${sdkconfig} "
"was skipped because the set-target action is being executed.")