CMake find_program() has particular file permissions behavior described in CMP0109
This CMake script explores / verifies such behavior for find_library, find_file, and find_path. Note that behavior on Windows is distinct from other operating systems due to distinct file permissions on Windows in general.
On Unix-like file systems, read permission is required for find_library, find_file, etc.
cmake -B build
-- noread_shared_lib: noread_shared_lib-NOTFOUND
-- noread_static_lib: noread_static_lib-NOTFOUND
-- noread_shared_file: noread_shared_file-NOTFOUND
-- nowrite_shared_p: /tmp/build/libnowrite_shared.so
-- nowrite_static_p: /tmp/build/libnowrite_static.a