On 12/19/2014 06:25 PM, Thompson, KT wrote:
> Hmm.  It looks my original proposal breaks some backward compatibility.
[snip]
> @@ -1148,13 +1148,13 @@ bool SystemTools::FileExists(const kwsys_stl::string& 
> filename)
[snip]
> -  return access(filename.c_str(), R_OK) == 0;
> +  return access(filename.c_str(), R_OK) == 0 || access(filename.c_str(), 
> X_OK) == 0;

The issue your patch tries to address is tracked here:

 http://www.cmake.org/Bug/view.php?id=10468

However, there is a deeper issue discussed here:

 http://www.cmake.org/Bug/view.php?id=14022

Basically "access" is not the right way to implement FileExists.
If we're going to change it at all, the change should make it do
the right thing.  See comments in issue 14022 for details.

Unfortunately the full fix likely requires an audit of all FileExists
call sites to determine which ones need to be just lstat and which
ones care about permissions too.

-Brad
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to