mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user