diff options
author | Brad King <brad.king@kitware.com> | 2020-06-30 11:25:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-30 11:25:54 (GMT) |
commit | a939f962d7ba214631bb39ed8b1a64551d5d002b (patch) | |
tree | c5a436d73dbe96837c6f166a13a8f2e064a6697f /Source | |
parent | 4b7b8c2885977eacc3ba769f7b3877e514957de3 (diff) | |
parent | f2c903fb9a02b129c6673385363f2a99f2f153ce (diff) | |
download | CMake-a939f962d7ba214631bb39ed8b1a64551d5d002b.zip CMake-a939f962d7ba214631bb39ed8b1a64551d5d002b.tar.gz CMake-a939f962d7ba214631bb39ed8b1a64551d5d002b.tar.bz2 |
Merge topic 'find_library-file-readable'
f2c903fb9a find_library: Check that library files are readable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4945
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 31f1201..3242b6d 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -433,7 +433,8 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path, #endif if (name.Regex.find(testName)) { this->TestPath = cmStrCat(path, origName); - if (!cmSystemTools::FileIsDirectory(this->TestPath)) { + // Make sure the path is readable and is not a directory. + if (cmSystemTools::FileExists(this->TestPath, true)) { this->DebugLibraryFound(name.Raw, dir); // This is a matching file. Check if it is better than the |