Hi, I'm new to CMake -- trying to do something relatively simple.  Not
having much luck -- I've scoured the docs/wiki, but searching the manual
http://cmake.org/cmake/help/v2.8.9/cmake.html in the browser results in a
million hits for a search string.

I just want to test if an environment variable is set and if it is not,
print a message and exit

Something like:

if("$ENV{FOO_HOME}" MATCHES "")
   message("You must set FOO_HOME")
   return()
endif()

This does not seem to work.  I've tried setting and unsetting $FOO_HOME,
and the if condition always applies.

What am I missing
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to