fix(cmakev2): Fix the order of project initialization in cmakev2

This commit moves the project initialization by moving the
__init_project_configuration() after the sdkconfig is generated and
included. This is because __init_project_configuration() depends on
config options.
This commit is contained in:
Sudeep Mohanty
2025-12-23 13:20:24 +01:00
parent e41ecaabf2
commit a69cbb5384

View File

@@ -575,9 +575,6 @@ macro(idf_project_init)
# Set PROJECT_VER build property
__init_project_version()
# Initialize all compilation options and defines.
__init_project_configuration()
# Create global flash targets.
__create_project_flash_targets()
@@ -598,6 +595,10 @@ macro(idf_project_init)
include("${sdkconfig_cmake}")
unset(sdkconfig_cmake)
# Initialize all compilation options and defines.
# This must be done after including sdkconfig.cmake
__init_project_configuration()
# Initialize the target architecture based on the configuration
# Ensure this is done after including the sdkconfig.
__init_idf_target_arch()