Modifying cmake will cause the entire project to be recompiled
Posted: 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.
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.