Hi, I&#39;m new to CMake -- trying to do something relatively simple.  Not having much luck -- I&#39;ve scoured the docs/wiki, but searching the manual <a href="http://cmake.org/cmake/help/v2.8.9/cmake.html">http://cmake.org/cmake/help/v2.8.9/cmake.html</a> in the browser results in a million hits for a search string.
<div><br></div><div>I just want to test if an environment variable is set and if it is not, print a message and exit</div><div><br></div><div>Something like:</div><div><br></div><div>if(&quot;$ENV{FOO_HOME}&quot; MATCHES &quot;&quot;)</div>
<div>   message(&quot;You must set FOO_HOME&quot;)</div><div>   return()</div><div>endif()</div><div><br></div><div>This does not seem to work.  I&#39;ve tried setting and unsetting $FOO_HOME, and the if condition always applies.</div>
<div><br></div><div>What am I missing</div><div><br></div>