title: Unexpected result from #cmakedefine substitution
body: <p>Suppose that in my <code>CMakeLists.txt</code> I have:</p>
  
  <pre><code>check_function_exists(getopt HAVE_GETOPT)
  configure_file(config.h.in config.h @ONLY)
  </code></pre>
  
  <p>and in <code>config.h.in</code> I have:</p>
  
  <pre><code>#cmakedefine HAVE_GETOPT @HAVE_GETOPT@
  #cmakedefine STDLIB_HAS_GETOPT @HAVE_GETOPT@
  </code></pre>
  
  <p>I expect to see</p>
  
  <pre><code>#define HAVE_GETOPT 1
  #define STDLIB_HAS_GETOPT 1
  </code></pre>
  
  <p>after the pass. instead, I get:</p>
  
  <pre><code>#define HAVE_GETOPT 1 
  /* #undef STDLIB_HAS_GETOPT */
  </code></pre>
  
  <p>why the difference in behavior?</p>
  
  <p>Notes: </p>
  
  <ul>
  <li>Using cMake v3.5.1 and GNU/Linux Mint 18.3 with a kernel 4.10.</li>
  </ul>