Skip to content

Commit

Permalink
Look for CMake.app when searching for cmake
Browse files Browse the repository at this point in the history
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

llvm-svn: 269713
  • Loading branch information
tfiala committed May 16, 2016
1 parent 14a4d31 commit 85df931
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lldb/scripts/Xcode/build-llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import errno
import hashlib
import os
import platform
import subprocess
import sys

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 85df931

Please sign in to comment.