3 ms·
Can you compile a header to an object file so that its definitions don't have to be recompiled every time the including file is recompiled?
by Athas 7y ago
Can you compile a header to an object file so that its definitions don't have to be recompiled every time the including file is recompiled?
- shakna 7y agoEh... Yes? GCC [0], Clang [1] and others [2] have supported for compiled headers. Cmake also has support for precompiled headers [3]. I would say both the tool and architecture to do that is well supported. [0] https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html [1] https://clang.llvm.org/docs/PCHInternals.html https://clang.llvm.org/docs/PCHInternals.html [2] https://www.qnx.com/developers/docs/6.3.2/neutrino/utilities/i/icc.html https://www.qnx.com/developers/docs/6.3.2/neutrino/utilities... (-pch flag) [3] https://cmake.org/cmake/help/latest/command/target_precompile_headers.html https://cmake.org/cmake/help/latest/command/target_precompil...