Modifying cmake will cause the entire project to be recompiled

Urada_esp
Posts: 4
Joined: Mon Aug 19, 2024 6:33 am

Modifying cmake will cause the entire project to be recompiled

Postby Urada_esp » Mon Aug 19, 2024 6:44 am

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:

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Mon Aug 19, 2024 8:46 am

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.

Urada_esp
Posts: 4
Joined: Mon Aug 19, 2024 6:33 am

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

Postby Urada_esp » Thu Aug 22, 2024 8:32 am

well, after using it for a while, I've gotten used to this process. thanks for your answer

Who is online

Users browsing this forum: nopnop2002 and 136 guests