The development I have done over the last few years uses a lot of pre-compiled headers. One for each product. The pre-compiled headers are used in a way to #define
items that each product needs. This does keep the code rather clean and portable among each product.
But, how does one replicate this approach without using a pre-compiled header?
Basically, be able to #define
a fair number of items and some basic includes, but have it not be a PCH.
Do you just create a .h
and include this in every class that needs these defines?
can you just rename the .pch
to a .h
? Structurally it would look the same right? Well, plus a header quard.
UPDATE: This is a codebase that used to use Codewarrior for Mac and Win. Now uses XCode on OS X and We may be migrating to CMake for both Mac and Win to help us not have so many different environments.