title: Dealing with compilation times when editing headers
body: <p>I'm working on a huge project which uses a system that, when running make, generates some header files that contain some constants that are used everywhere in the code. Due to the size of this project if one of those headers is changed (a constant is removed or another is added) almost the whole project must be recompiled (which sometimes takes several hours).</p>
  
  <p>My initial solution was to write some sort of <code>ConstantManager</code> class that has a map with each code-value pair and a getter that returns that given the code as a string returns its value (pretty straight forward) and also change the header generator so it would define the constants as <code>#define</code>s that expand to an instance of the <code>ConstantManager</code> and a call to the getter. The problem with this is that it will not work with <code>switch</code> statements (well... <code>case</code> statements actually) because the return values are not constant expressions.</p>
  
  <p>My question is: are there any alternative solutions to this problem or some trick to make mine work with switches?</p>