[Lldb-commits] [lldb] r269713 - Look for CMake.app when searching for cmake
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Mon May 16 15:29:15 PDT 2016
Author: tfiala
Date: Mon May 16 17:29:15 2016
New Revision: 269713
URL: http://llvm.org/viewvc/llvm-project?rev=269713&view=rev
Log:
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
Modified:
lldb/trunk/scripts/Xcode/build-llvm.py
Modified: lldb/trunk/scripts/Xcode/build-llvm.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=269713&r1=269712&r2=269713&view=diff
==============================================================================
--- lldb/trunk/scripts/Xcode/build-llvm.py (original)
+++ lldb/trunk/scripts/Xcode/build-llvm.py Mon May 16 17:29:15 2016
@@ -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.
More information about the lldb-commits
mailing list