Why is clang recompiling all C++ files including a header file if the recent change does not impact most of them?

Viewed 269

I have a Constants header file that is included by most of my source files. If I change a constant in there that is only used by ~2 source files, then Clang is still recompiling all ~300 source files that include this header file.

Is there any way to only recompile the source files that get actually influenced by the change I made without having to split the Constants file into many tiny parts? I would really like to speed up the compilation process after small changes.

Since my build system and environment seems to matter: I'm using Xcode 8.3.3 on OSX, compiling C++ code for iOS.

0 Answers
Related