> Greetings
>
> I tried an execute_process that  spits out a file. Llets call this
> ${someDirectory}/someFile.
>
> I then tried   to do a test like so
>   if( ${someDirectory}/someFile 1 )
>   --- do something
> endif( ${someDirectory}/someFile 1 )
>
> but it does not seem to work
>
> in  shell scripts{linux}   we can use   the following:-
>  if  [-f  ${someDirectory}/someFile ] ;  do somehing
>  or
>  if  [-r ${someDirectory}/someFile ];   do something else
>
> advice on their equivalent in cmake scripts would be appreciated.

You should really start to read the man page.

===
  if(EXISTS file-name)
  if(EXISTS directory-name)

 True if the named file or directory exists. Behavior is well-defined only
for full paths.
===

Eike
_______________________________________________
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