find_program regression about executable bit set
Hello,
the following test case has a regression from 3.17 to 3.18.0-rc1:
cmake_minimum_required(VERSION 3.15.1 FATAL_ERROR)
project(testcase NONE)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/foo.rb" "")
find_program(FOO_EXECUTABLE
NAMES foo.rb
PATHS ${CMAKE_CURRENT_BINARY_DIR}
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
if(NOT FOO_EXECUTABLE)
message(FATAL_ERROR "Could not find foo.rb")
endif()
In CMake 3.18.0-rc1 find_program
seems to check for the executable bit, something which previous versions did not do.
Expecting something executable seems the right thing to do for find_program
, but maybe this behavior change needs a policy.
Thanks, Gregor