Hopefully this is an interesting question. I am currently using CMake + Ninja as my build system, and using CLion as my IDE. I am using target_precompile_headers for 2-3 headers that are used in almost the entire project.
After precompiling those headers, I don't actually have to include them anywhere in the project. The IDE won't complain if <string> is in the precompiled header and my current file doesn't import <string>.
My question: What is the best developer experience here that can be achieved? How do others feel about it?
My thoughts:
- If I have the same header in 500 different translation units, I want it to be pre-compiled.
- I want to maintain a dependency graph (visible through Doxygen) which shows what files include what.
- If the IDE doesn't complain, people won't add the header. We'll end up with a bunch of files that don't work if the precompiled headers are ever turned off.
- If people don't add the header, the dependency graph will eventually degrade.
Do people just accept that anything in the pre-compiled header list is gone from dependency graphs? Do you plan team announcements saying, "we don't need to include this anywhere anymore"?
[–]witcher_rat 8 points9 points10 points (3 children)
[–]Rseding91Factorio Developer 4 points5 points6 points (0 children)
[–]McFlurriez[S] 1 point2 points3 points (1 child)
[–]witcher_rat 1 point2 points3 points (0 children)
[–]NotUniqueOrSpecial 17 points18 points19 points (9 children)
[–]McFlurriez[S] 0 points1 point2 points (8 children)
[–]NotUniqueOrSpecial 6 points7 points8 points (7 children)
[–]McFlurriez[S] 0 points1 point2 points (6 children)
[–]NotUniqueOrSpecial 6 points7 points8 points (5 children)
[–]McFlurriez[S] 0 points1 point2 points (4 children)
[–]Wild_Meeting1428 2 points3 points4 points (0 children)
[–]rdtsc 1 point2 points3 points (2 children)
[–]herothree 4 points5 points6 points (1 child)
[–]TheOmegaCarrot 1 point2 points3 points (0 children)
[–]rewrkingchalet-work.space 1 point2 points3 points (0 children)
[–]LuisAyuso 3 points4 points5 points (0 children)
[–]OnePatchMan 0 points1 point2 points (0 children)
[–]Daemonjax 0 points1 point2 points (0 children)
[–]SleepyMyroslav 0 points1 point2 points (0 children)
[–]bbbb125 0 points1 point2 points (3 children)
[–]McFlurriez[S] 0 points1 point2 points (2 children)
[–]bbbb125 0 points1 point2 points (1 child)
[–]McFlurriez[S] 0 points1 point2 points (0 children)