Skip to content

Albert-Deng/cmake-examples

Repository files navigation

CMake Examples

Introduction

CMake is a cross-platform open-source build system which can build, test and package software. It can be used to support multiple native build environments including make, Apple’s xcode and Microsoft Visual Studio.

This repository includes some example CMake configurations which I have picked up when exploring it’s usage for various projects. The examples are laid out in a tutorial like format. The first examples are very basic and slowly increase in complexity drawing on previous examples to show more complex use cases.

These examples have been tested on Ubuntu 14.04 but should work under any Linux system that supports CMake.

Requirements

The basic requirements for most examples are:

  • CMake

  • A c++ compiler (defaults to gcc)

  • make

The easiest way to install the above on Ubuntu is as follows

$ sudo apt-get install build-essential
$ sudo apt-get install cmake

Some specific examples may require other tools including:

  • boost

    `$ sudo apt-get libboost-all-dev`
  • protobuf

    `$ sudo apt-get install libprotobuf-dev`
  • cppcheck

    `$ sudo apt-get install cppcheck`

Other Links

There are many CMake tutorials and examples online. The list below includes links to some of these which I have found helpful in my CMake journey.

Releases

No releases published

Packages

No packages published

Languages

  • CMake 48.1%
  • C++ 24.9%
  • Shell 11.0%
  • Python 8.4%
  • Roff 7.6%