LoginSignup
52
50

More than 5 years have passed since last update.

[Linux][cmake] 最新のcmakeをインストールする方法

Last updated at Posted at 2016-09-28

Ubuntuのaptで持ってこれるcmakeのバージョンがビルドの要求最小バージョンより古い場合があったため、
最新のcmakeを取得する方法を調べた。

バイナリを取得

公式のDownloadの Binary distributions: 以下から環境に合わせたものを選択。

Download | CMake

cmake_bin.jpg

ソースからビルド

同じく公式のDownloadの Source distributions: 以下から環境に合わせたものを選択。

Download | CMake

cmake_src.jpg

ダウンロードと展開(cmake-3.6.2の場合)
$ wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
$ tar xvf cmake-3.6.2.tar.gz

添付の README.rst によると以下のようにするらしい

ビルド
$ ./bootstrap && make && make install
or
$ ./bootstrap && make && sudo make install

configure というスクリプトもあったが、確認したところ内部で bootstrap を実行しているだけなので、どちらでも変わらないっぽい
(bootstrap がすごい長大な shell script だったので驚いた。cmakeのビルド自体は力技感がすごい)

52
50
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
52
50