Search found 4 matches

by champonthis
Wed Dec 16, 2020 9:51 am
Forum: ESP-IDF
Topic: problem with CmakeLists.txt conditional configuration
Replies: 7
Views: 7334

Re: problem with CmakeLists.txt conditional configuration

Okay, I found now the hint in documentation: The values of REQUIRES and PRIV_REQUIRES should not depend on any configuration choices (CONFIG_xxx macros). This is because requirements are expanded before configuration is loaded. Other component variables (like include paths or source files) can depen...
by champonthis
Wed Dec 16, 2020 9:23 am
Forum: ESP-IDF
Topic: problem with CmakeLists.txt conditional configuration
Replies: 7
Views: 7334

Re: problem with CmakeLists.txt conditional configuration

I added now some output in CmakeLists.txt set(priv_requires "componentA" "componentB") if(CONFIG_DEMO_OPTION1) list(APPEND priv_requires "componentC") elseif(CONFIG_DEMO_OPTION2) list(APPEND priv_requires "componentD") endif() message(STATUS "Option 1 : ${CONFIG_DEMO_OPTION1}") message(STATUS "Optio...
by champonthis
Fri Dec 11, 2020 4:47 pm
Forum: ESP-IDF
Topic: problem with CmakeLists.txt conditional configuration
Replies: 7
Views: 7334

Re: problem with CmakeLists.txt conditional configuration

This was just typo, because I adopted my code. Did try everything like fullclean etc. In sdkconfig.h options are set correct. They are also correct in code like if I do like #ifdef CONFIG_OPTION_1 etc. But like said, in the CmakeLists.txt it get not applied. Do I have to set somewhere to include the...
by champonthis
Fri Dec 11, 2020 5:26 am
Forum: ESP-IDF
Topic: problem with CmakeLists.txt conditional configuration
Replies: 7
Views: 7334

problem with CmakeLists.txt conditional configuration

I am just trying to following this guide https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html#adding-conditional-configuration But my settings are always ignored and building always results in else() case with "componentE" my CmakeLists.txt of my compoonent to con...