How to rebuild only changed files?

已回答

I have average size project. I do small change in main.cpp and do run/build

CLion call cmake to rebuild all.

Note: cmake alone can rebuild only changed files if exists compiled obj

0

Now I check: sometimes build rebuilds only new files sometimes all files. Why?

0

Hello! If you would like to compile one file at a time without building the whole project, please use the Recompile action (Run | Recompile). Recompile is available for individual source and header files (for the latter, CLion uses resolve context to compile one of the source files that include the specified header). Note that Recompile is disabled for directories and non-C/C++ files.

0

FWIW I read somewhere earlier today that if you change a cpp file, then only that file will be compiled, however, if you change a header file it will have to recompile everything that touches that header file including all related implementation files.

0

请先登录再写评论。