class Cmake < Formula desc "Cross-platform make" homepage "https://www.cmake.org/" url "https://cmake.org/files/v3.13/cmake-3.13.0.tar.gz" sha256 "4058b2f1a53c026564e8936698d56c3b352d90df067b195cb749a97a3d273c90" head "https://cmake.org/cmake.git" bottle do cellar :any_skip_relocation rebuild 1 sha256 "9c2121c1fd3aba78701162af7572f5fe6dda87f72b96e706702b45367c70138c" => :mojave sha256 "c80889e1036d1f65fb8b8e9dec255ea29c795d4502718c572c5e55ec6228ed1c" => :high_sierra sha256 "4fc4de2441735bc2813c321e26aa1fbb98c99992cefc955d6a447bb1bf306756" => :sierra end depends_on "sphinx-doc" => :build # The completions were removed because of problems with system bash # The `with-qt` GUI option was removed due to circular dependencies if # CMake is built with Qt support and Qt is built with MySQL support as MySQL uses CMake. # For the GUI application please instead use `brew cask install cmake`. needs :cxx11 def install ENV.cxx11 if MacOS.version < :mavericks # Avoid the following compiler error: # SecKeychain.h:102:46: error: shift expression '(1853123693 << 8)' overflows ENV.append_to_cflags "-fpermissive" if MacOS.version <= :lion args = %W[ --prefix=#{prefix} --no-system-libs --parallel=#{ENV.make_jobs} --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man --sphinx-build=#{Formula["sphinx-doc"].opt_bin}/sphinx-build --sphinx-html --sphinx-man --system-zlib --system-bzip2 --system-curl ] # There is an existing issue around macOS & Python locale setting # See https://bugs.python.org/issue18378#msg215215 for explanation ENV["LC_ALL"] = "en_US.UTF-8" system "./bootstrap", *args, "--", "-DCMAKE_BUILD_TYPE=Release" system "make" system "make", "install" elisp.install "Auxiliary/cmake-mode.el" end test do (testpath/"CMakeLists.txt").write("find_package(Ruby)") system bin/"cmake", "." end end