fix(cmakev2/utilities): avoid overwriting compile_options in __get_compile_options

Currently, the generic compile_options are ignored because they are
unset after retrieving the build property. To fix this, avoid explicitly
setting compile_options, as this variable is initialized with the
idf_build_get_property(compile_options ...) call.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-11-04 07:48:13 +01:00
parent 63dd4c91fb
commit 728b7c1f78
-1
View File
@@ -469,7 +469,6 @@ function(__get_compile_options)
idf_build_get_property(cxx_compile_options CXX_COMPILE_OPTIONS GENERATOR_EXPRESSION)
idf_build_get_property(asm_compile_options ASM_COMPILE_OPTIONS GENERATOR_EXPRESSION)
set(compile_options)
foreach(option IN LISTS c_compile_options)
list(APPEND compile_options $<$<COMPILE_LANGUAGE:C>:${option}>)
endforeach()