Page 1 of 1

Modifying cmake will cause the entire project to be recompiled

Posted: Mon Aug 19, 2024 6:44 am
by Urada_esp
Modifying cmake (for example, when adding source files or adding requires items) will cause the entire project's 1400+ files to be recompiled. Is this normal? I can understand that modifying sdkconfig will cause the entire project to be recompiled, which may set some constants and macros.
Each recompilation takes a minute or more, which is very annoying, especially some linking problems caused by cmake code errors, which will only be reported after the compilation is completed. I am used to writing code in one file, cleaning it up and moving it to a separate file after it works, which causes me to modify cmake frequently, and I end up spending almost a third of my work waiting for the code to compile. :oops:

Re: Modifying cmake will cause the entire project to be recompiled

Posted: Mon Aug 19, 2024 8:46 am
by ESP_Sprite
Yep. CMake sources define nigh everything in the build system, from the compiler and defines used, to the include directories, to the order of linkage. There's no way to tell how much a change in a CMakeLists.txt file will affect, so everything needs to be redone.

Re: Modifying cmake will cause the entire project to be recompiled

Posted: Thu Aug 22, 2024 8:32 am
by Urada_esp
well, after using it for a while, I've gotten used to this process. thanks for your answer