1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

find_program: Revert "Find programs that are executable but not readable"

The fix in commit 86e6349ef7 (find_program: Find programs that are
executable but not readable, 2020-04-04, v3.18.0-rc1~372^2) can break
existing projects that were (likely accidentally) relying on the
old behavior to find files that are readable but not executable.
Revert the fix for now.  We can re-introduce it with a policy later.

Instead of reverting the test case, update it to cover the old behavior.
That can serve as a reference for testing the policy when introduced.

Fixes: #20814
Issue: #10468
This commit is contained in:
Brad King
2020-06-10 09:05:56 -04:00
parent 596cfd2680
commit cc02ced530
3 changed files with 11 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ struct cmFindProgramHelper
this->TestNameExt = cmStrCat(name, ext);
this->TestPath =
cmSystemTools::CollapseFullPath(this->TestNameExt, path);
bool exists = cmSystemTools::FileIsExecutable(this->TestPath);
bool exists = cmSystemTools::FileExists(this->TestPath, true);
exists ? this->DebugSearches.FoundAt(this->TestPath)
: this->DebugSearches.FailedAt(this->TestPath);
if (exists) {