title: Include a header file for parsing of all other files with Doxygen preprocessor
body: <p>I want to include the <code>#define</code>s from a <code>h</code> file for parsing of all other files with Doxygen.</p>
  
  <hr>
  
  <p><strong>Project background:</strong></p>
  
  <p>My C project includes a header file <code>config.h</code> on it's the build command.</p>
  
  <p>It also defines a target <code>MODEL_A</code> on the same build command.</p>
  
  <p><code>config.h</code> creates defines depending on the target being built (not the same lists of defines for <code>MODEL_A</code> as for <code>MODEL_B</code>):</p>
  
  <pre><code>#if defined(MODEL_A)
  #define HAS_FUNCTIONALITY_1
  #define HAS_FUNCTIONALITY_2
  #elif defined(MODEL_B)
  #define HAS_FUNCTIONALITY_3
  #define HAS_FUNCTIONALITY_4
  #endif 
  </code></pre>
  
  <hr>
  
  <p><strong>My issue with Doxygen:</strong></p>
  
  <p>I try to generate documentation with Doxygen. I have in the Doxyfile:</p>
  
  <pre><code># including of config.h to INPUT seems necessary.
  INPUT = ./source/config.h \
      ./source
  ENABLE_PREPROCESSING = YES
  MACRO_EXPANSION = YES
  EXPAND_ONLY_PREDEF = NO
  INCLUDE_PATH = ./source
  INCLUDE_FILE_PATTERNS = ./source/config.h
  PREDEFINED = MODEL_A
  </code></pre>
  
  <p>The code that is dependent on the defines <code>HAS_FUNCTIONALITY_x</code> is not included in the documentation, as if the preprocessor did not get the defines in <code>config.h</code>.</p>
  
  <hr>
  
  <p><strong>My findings so far:</strong></p>
  
  <p>I inspected the preprocessor output with help of <code>doxygen -d Preprocessor</code>, and could see that:</p>
  
  <ul>
  <li><code>./source/config.h</code> was parsed first, and correctly according to <code>MODEL_A</code> (I can see the correct <code>#defines</code> in the preprocessor output). <code>#define HAS_FUNCTIONALITY_1</code> figures in the preprocessor output.</li>
  <li>the preprocessing of <strong>C</strong> files which depend on <code>HAS_FUNCTIONALITY_1</code> act as if it was not defined. </li>
  </ul>
  
  <p>Defining <code>HAS_FUNCTIONALITY_1</code> in the field <code>PREDEFINED</code> of the Doxyfile works as expected. This is not a practical solution, but still interesting.</p>
  
  <hr>
  
  <p>How do I make sure that the <code>#define</code> rows that are preprocessed first from <code>config.h</code> stay defined when the preprocessor works on all subsequent <strong>C</strong> files?</p>