Skip to content

find_program: Find programs that have execute but not read permission

Vladimir requested to merge whoozle/cmake:fix-find-program into master

This commit fixes find_program failing to detect executable without read bit set. find_program internally uses SystemTools::FileExists which calls access(R_OK) instead of access(X_OK). Replacing SystemTools::FileExists with SystemTools::IsFileExecutable fixes this issue.

Fine example of such program is sudo.

This commit requires utils/kwsys!175 (merged).

Fixes: #10468 (closed)
Topic-rename: find_program-exe-no-read

Edited by Brad King

Merge request reports