Look for CMake.app when searching for cmake
On OS X systems, look for /Applications/CMake.app and ~/Applications/CMake.app versions of the cmake command line binary when trying harder to find a cmake not on the system path. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20303 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@269713 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
2483bdab78
Коммит
86f7c36903
|
@ -3,6 +3,7 @@
|
|||
import errno
|
||||
import hashlib
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
@ -243,6 +244,23 @@ def find_cmake ():
|
|||
"/opt/local/bin",
|
||||
os.path.join(os.path.expanduser("~"), "bin")
|
||||
]
|
||||
|
||||
if platform.system() == "Darwin":
|
||||
# Add locations where an official CMake.app package may be installed.
|
||||
extra_cmake_dirs.extend([
|
||||
os.path.join(
|
||||
os.path.expanduser("~"),
|
||||
"Applications",
|
||||
"CMake.app",
|
||||
"Contents",
|
||||
"bin"),
|
||||
os.path.join(
|
||||
os.sep,
|
||||
"Applications",
|
||||
"CMake.app",
|
||||
"Contents",
|
||||
"bin")])
|
||||
|
||||
cmake_binary = find_executable_in_paths("cmake", extra_cmake_dirs)
|
||||
if cmake_binary:
|
||||
# We found it in one of the usual places. Use that.
|
||||
|
|
Загрузка…
Ссылка в новой задаче