Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing CMake command line tools on a Mac

I installed CMake literally two days ago with no problems through the GUI and selecting "Install Command Line Tools". I just got a brand new Macbook and trying to install CMake again but the option has changed to "How to Install Command Line Tools" and just crashes the app when clicked

Is there a reason it has changed? Is there another way to install the command line tools?

like image 310
RyanOfCourse Avatar asked Jun 05 '15 14:06

RyanOfCourse


People also ask

How use CMake command line Mac?

To install CMake, simply type “brew install cmake” in the terminal. Once you have installed CMake, type “cmake” in your terminal to check if it's installed. To compile example.


1 Answers

As of version 3.9.4, the "How to Install Command Line Tools" says:

One may add CMake to the PATH:

PATH="/Applications/CMake.app/Contents/bin":"$PATH"

Or, to install symlinks to '/usr/local/bin', run:

sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

Or, to install symlinks to another directory, run:

sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install=/path/to/bin

The middle option worked perfectly for what I needed: installing an older version of Swift using swiftenv.

like image 175
leanne Avatar answered Sep 21 '22 06:09

leanne