title: cmake: stop if a manually specified variable is not used by the project
body: <p>if I give as an input parameter an undefined variable to CMake, it will simply warn me about the fact that this variable is not used by the project.</p>
  
  <p>So, I wonder whether one can tell cmake to stop in case of undefined variables given by the user.</p>
  
  <p>The only approach I came so far to, was to parse the cmake output log and search for strings like:</p>
  
  <pre><code>CMake Warning:
  Manually-specified variables were not used by the project
  </code></pre>
  
  <p>I had a look at the man of cmake, without finding something which could do the job.
  so how can i tell cmake, that instead of a simple warning, that I may miss, it should stop on CMake Warning about unknown variables?</p>
  
  <p>The solution, if any, should not involve modifying the CMakeList.txt files.</p>
  
  <p>Of course, I can download the cmake sources and change in the</p>
  
  <pre><code> cmake::RunCheckForUnusedVariables() 
  </code></pre>
  
  <p>method:</p>
  
  <pre><code> this-&gt;IssueMessage(cmake::WARNING, msg.str());
  </code></pre>
  
  <p>by:</p>
  
  <pre><code> this-&gt;IssueMessage(cmake::FATAL_ERROR, msg.str());
  </code></pre>
  
  <p>but if i could avoid doing that hack, I will be grateful!</p>
  
  <p>thanks for your help.</p>