Re: [CMake] Test if ENV${VAR} is set

2012-09-14 Thread Davis Ford
Thanks to all for the feedback / suggestions. I did edit the wiki -- feel free to revise my submission or extend with your own. I linked to this thread on there, as well. http://www.itk.org/Wiki/CMake/Examples#Check_if_environment_variable_is_set On Fri, Sep 14, 2012 at 4:43 PM, Bogdan Cristea

Re: [CMake] Test if ENV${VAR} is set

2012-09-14 Thread Bogdan Cristea
On Friday 14 September 2012 16:26:10 you wrote: > On Fri, Sep 14, 2012 at 4:17 PM, Bogdan Cristea wrote: > > On Friday 14 September 2012 16:13:16 Davis Ford wrote: > >> if("$ENV{FOO_HOME}" MATCHES "") > >> > >>message("You must set FOO_HOME") > >>return() > >> > >> endif() > > > > Try s

Re: [CMake] Test if ENV${VAR} is set

2012-09-14 Thread Eric Clark
gt; Sent: Friday, September 14, 2012 3:26 PM > To: Bogdan Cristea > Cc: cmake@cmake.org > Subject: Re: [CMake] Test if ENV${VAR} is set > > On Fri, Sep 14, 2012 at 4:17 PM, Bogdan Cristea wrote: > > On Friday 14 September 2012 16:13:16 Davis Ford wrote: > >> if(&quo

Re: [CMake] Test if ENV${VAR} is set

2012-09-14 Thread David Cole
On Fri, Sep 14, 2012 at 4:17 PM, Bogdan Cristea wrote: > On Friday 14 September 2012 16:13:16 Davis Ford wrote: >> if("$ENV{FOO_HOME}" MATCHES "") >>message("You must set FOO_HOME") >>return() >> endif() > > Try something like this > > if(NOT ENV{FOO_HOME}) > message("etc") > endif() > > -

Re: [CMake] Test if ENV${VAR} is set

2012-09-14 Thread Bogdan Cristea
On Friday 14 September 2012 16:13:16 Davis Ford wrote: > if("$ENV{FOO_HOME}" MATCHES "") >message("You must set FOO_HOME") >return() > endif() Try something like this if(NOT ENV{FOO_HOME}) message("etc") endif() -- Bogdan -- Powered by www.kitware.com Visit other Kitware open-source

[CMake] Test if ENV${VAR} is set

2012-09-14 Thread Davis Ford
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