CMake is a more advanced cross-platform installation, build, and configuration tool than make. You can use a simple statement to describe the installation (build process) on all platforms. And generate the corresponding Makefile or project file depending on the platform and compiler. This article introduces how to install and configure CMake on MAC OSX.

The official installation

Download DMG CMake from the official download link on the launchpad

  1. Open cmake and click Tools to select How to Install For Command Line Use
  2. You can choose the corresponding method according to your needs. The author chooses the second method here. You can directly copy the command to the terminal and paste the execution
  3. The terminal enters the command to view the CMake versioncmake -version

Homebrew is installed

Install cmake for Homebrew. Install cmake for Homebrew.

This is how to install CMake on macOS