| 3065 | |
| 3066 | #ifndef CMAKE_BOOTSTRAP |
| 3067 | bool ResolveSymlinkToOwnExecutable(std::string& exe, std::string& exe_dir) |
| 3068 | { |
| 3069 | std::string linked_exe; |
| 3070 | if (!cmSystemTools::ReadSymlink(exe, linked_exe)) { |
| 3071 | return false; |
| 3072 | } |
| 3073 | # if defined(__APPLE__) |
| 3074 | // Ignore "cmake-gui -> ../MacOS/CMake". |
| 3075 | if (IsCMakeAppBundleExe(linked_exe)) { |
| 3076 | return false; |
| 3077 | } |
| 3078 | # endif |
| 3079 | if (cmSystemTools::FileIsFullPath(linked_exe)) { |
| 3080 | exe = std::move(linked_exe); |
| 3081 | } else { |
| 3082 | exe = cmStrCat(exe_dir, '/', std::move(linked_exe)); |
| 3083 | } |
| 3084 | exe = cmSystemTools::ToNormalizedPathOnDisk(std::move(exe)); |
| 3085 | exe_dir = cmSystemTools::GetFilenamePath(exe); |
| 3086 | return true; |
| 3087 | } |
| 3088 | |
| 3089 | bool FindCMakeResourcesInInstallTree(std::string const& exe_dir) |
| 3090 | { |
no test coverage detected
searching dependent graphs…