Files
CMake/Tests/RunCMake/find_program/RunCMakeTest.cmake
Brad King 9d45a8be08 find_program: Find programs that are executable but not readable
This fix was first made by commit 86e6349ef7 (find_program: Find
programs that are executable but not readable, 2020-04-04,
v3.18.0-rc1~372^2) but was reverted for compatibility.  Re-introduce it
with a policy for compatibility.

Fixes: #10468
2020-06-15 11:58:47 -04:00

29 lines
577 B
CMake

include(RunCMake)
run_cmake(EnvAndHints)
run_cmake(DirsPerName)
run_cmake(NamesPerDir)
run_cmake(RelAndAbsPath)
run_cmake(Required)
if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN)$")
run_cmake(WindowsCom)
run_cmake(WindowsExe)
else()
# test non readable file only if not root
execute_process(
COMMAND id -u $ENV{USER}
OUTPUT_VARIABLE uid
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT "${uid}" STREQUAL "0")
run_cmake(CMP0109-WARN)
run_cmake(CMP0109-OLD)
run_cmake(CMP0109-NEW)
endif()
endif()
if(APPLE)
run_cmake(BundleSpaceInName)
endif()