On 21/12/12 11:19, Alan W. Irwin wrote:
On 2012-12-21 09:43+0100 Eric Noulard wrote:
2012/12/21 Alan W. Irwin
<irwin-ICHe1znInSgulI1VNbnaeCwD8/[email protected]>:
Obviously for my use case it does look like a
reasonable alternative is to use file(GLOB...) followed by a check of
the result variable to see if it is empty. But implementation of an
additional IF subcommand called IS_FILE which just checks for the
existence of the specified file would do this in fewer lines and does
Precisely the purpose of
if(EXISTS ${file})
I think.
Thanks, Eric. EXISTS is what I needed.
I still think adding the qualifying phrase "if it exists or not" to the
IS_ABSOLUTE documentation would be useful.
I'd rather IS_ABSOLUTE did not force the file to exist.
I use it to check if some paths are absolute, regardless of whether they
exist.
--
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers