This site has been moved to the HSF training page! https://hsf-training.github.io/hsf-training-cmake-webpage
Welcome to the FIRST-HEP CMake tutorial! The aim of this tutorial is to cover the basics of using CMake. This tutorial is based on the online book Modern CMake, with a focus on CMake 3.14+. This is in what is called the “More Modern” era of CMake (which is 3.12+), and includes the fantastic command line improvements in CMake π (notes for 3.11+ compatible features will be included usually). We will cover the basics of making and building a project, and some details of design.
First taught at the 2019 USATLAS Computing Bootcamp at LBNL.
Prereqs
On your computer, you need to have:
git
cmake
(Version 3.14 or newer). See the instructions here.- A C++ compiler - system default is fine.
make
orninja
A quick and minimal docker works well, too:
docker run --rm -it alpine apk add git g++ cmake make git clone https://github.com/henryiii/cmake_workshop.git cd cmake_workshop
This does not make a volume, so you will lose whatever you do in here when it exits - that’s probably a good thing mostly.