On 01/25/2016 08:27 AM, Ben Boeckel wrote: > It's both :) . FileExists is implemented using access() rather than > something like lstat(), so that would indeed be not a "program" since > the file doesn't "exist". > > It was on my list to fix, but the backwards compatibility argument > (IIRC) made it near impossible to change.
There are related issues here: https://cmake.org/Bug/view.php?id=14022 https://cmake.org/Bug/view.php?id=10468 The main compatibility concern is not about find_program, but just about other uses of FileExists. Each time this has come up before we've determined the full solution requires a non-trivial audit of all uses of FileExists. That lost sight of the immediate find_program problem, so instead we could look at fixing just that. Since then we've gained the cmSystemTools::TestFileAccess() function. One could look at porting find_program to use it with TEST_FILE_EXECUTE. The Tests/RunCMake/find_program test could be extended to cover this once it is fixed. -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