mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(cmakev2): respect explicit SET_COMPILER_OPTIMIZATION values
Use a DEFINED check instead of a truthy check so explicit NO/OFF/FALSE values are honored.
This commit is contained in:
@@ -190,7 +190,7 @@ function(__init_project_configuration)
|
|||||||
# Subprojects that handle their own compiler optimization flags can set the
|
# Subprojects that handle their own compiler optimization flags can set the
|
||||||
# SET_COMPILER_OPTIMIZATION build property to NO before idf_project_init().
|
# SET_COMPILER_OPTIMIZATION build property to NO before idf_project_init().
|
||||||
idf_build_get_property(set_compiler_optimization SET_COMPILER_OPTIMIZATION)
|
idf_build_get_property(set_compiler_optimization SET_COMPILER_OPTIMIZATION)
|
||||||
if(NOT set_compiler_optimization)
|
if(NOT DEFINED set_compiler_optimization OR set_compiler_optimization STREQUAL "")
|
||||||
set(set_compiler_optimization YES)
|
set(set_compiler_optimization YES)
|
||||||
endif()
|
endif()
|
||||||
if(set_compiler_optimization)
|
if(set_compiler_optimization)
|
||||||
|
|||||||
Reference in New Issue
Block a user