class Cmake < Formula desc "Cross-platform make" homepage "https://www.cmake.org/" url "https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-3.15.1.tar.gz" sha256 "18dec548d8f8b04d53c60f9cedcebaa6762f8425339d1e2c889c383d3ccdd7f7" head "https://cmake.org/cmake.git" bottle do cellar :any_skip_relocation sha256 "69e25aedc59379712ac9b1185d5896418e1c824901ea1bcf795d6dc6a2446549" => :mojave sha256 "c19072c287a9fb4272d2b3b48d56f98711bd94147ddc9e316bb4a2cd39a35cd9" => :high_sierra sha256 "ef76d50cb919f8a648c4e2dfc30709409e52d4f0e16fe547b4f2d306d3d08ce3" => :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`. def install 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