diff options
author | Brad King <brad.king@kitware.com> | 2020-06-10 14:23:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-15 15:58:47 (GMT) |
commit | 9d45a8be085490a6c3ce4db27968247297a8bdd2 (patch) | |
tree | 6a03a90c1d5b667f0c3541f31eb86ce0ef02c048 /Help | |
parent | 43b10e2411858ae7734c54480a8c0c6c3ccd659b (diff) | |
download | CMake-9d45a8be085490a6c3ce4db27968247297a8bdd2.zip CMake-9d45a8be085490a6c3ce4db27968247297a8bdd2.tar.gz CMake-9d45a8be085490a6c3ce4db27968247297a8bdd2.tar.bz2 |
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
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 8 | ||||
-rw-r--r-- | Help/policy/CMP0109.rst | 22 | ||||
-rw-r--r-- | Help/release/dev/find_program-exe-no-read.rst | 5 |
3 files changed, 35 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index e98038a..3ceb1df 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,14 @@ Policies Introduced by CMake 3.18 .. toctree:: :maxdepth: 1 + CMP0109: find_program() requires permission to execute but not to read. </policy/CMP0109> + +Policies Introduced by CMake 3.18 +================================= + +.. toctree:: + :maxdepth: 1 + CMP0108: A target cannot link to itself through an alias. </policy/CMP0108> CMP0107: An ALIAS target cannot overwrite another target. </policy/CMP0107> CMP0106: The Documentation module is removed. </policy/CMP0106> diff --git a/Help/policy/CMP0109.rst b/Help/policy/CMP0109.rst new file mode 100644 index 0000000..7542c8f --- /dev/null +++ b/Help/policy/CMP0109.rst @@ -0,0 +1,22 @@ +CMP0109 +------- + +:command:`find_program` requires permission to execute but not to read. + +In CMake 3.18 and below, the :command:`find_program` command on UNIX +would find files that are readable without requiring execute permission, +and would not find files that are executable without read permission. +In CMake 3.19 and above, ``find_program`` now prefers to require execute +permission but not read permission. This policy provides compatibility +with projects that have not been updated to expect the new behavior. + +The ``OLD`` behavior for this policy is for ``find_program`` to require +read permission but not execute permission. +The ``NEW`` behavior for this policy is for ``find_program`` to require +execute permission but not read permission. + +This policy was introduced in CMake version 3.19. CMake version |release| +warns when the policy is not set and uses ``OLD`` behavior. Use the +:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/find_program-exe-no-read.rst b/Help/release/dev/find_program-exe-no-read.rst new file mode 100644 index 0000000..161b5db --- /dev/null +++ b/Help/release/dev/find_program-exe-no-read.rst @@ -0,0 +1,5 @@ +find_program-exe-no-read +------------------------ + +* The :command:`find_program` command now requires permission to execute + but not to read the file found. See policy :policy:`CMP0109`. |