Difference between revisions of "Programming/Tools/CMake"

From Thalesians Wiki
Line 18: Line 18:
</pre>
</pre>


Since we'll be using CMake with <tt>gcc</tt>&mdash;GNU project C and C++ compiler,&mdash; we also need to install <tt>gcc</tt>:
Since we'll be using CMake with <tt>gcc</tt>&mdash;[https://gcc.gnu.org/ GNU project C and C++ compiler],&mdash; we also need to install <tt>gcc</tt>:
<pre>
<pre>
$ sudo apt install gcc
$ sudo apt install gcc
</pre>
</pre>

Revision as of 14:15, 22 December 2020

Overview

CMake is an open-source, cross-platform family of tools designed to build, test, and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.

CMake is part of Kitware's collection of commercially supported open-source platforms for software development.

This tutorial

In this tutorial we demonstrate how to set up and build an (admittedly very simple) project using CMake on an Ubuntu 20.04.1 LTS system. The tutorial should be applicable to other Linux systems, possibly with minor modifications.

Preparation

First, we need to install CMake:

$ sudo apt update
...
$ sudo apt install cmake

Since we'll be using CMake with gccGNU project C and C++ compiler,— we also need to install gcc:

$ sudo apt install gcc