CMake is a popular open-source, cross-platform family of tools designed to build, test, and package software.
In this lesson we will motivate the use of Make and CMake discover and apply various CMake building blocks. We will exercise applying the material by configuring and building an example mixed Fortran-C++ project using CMake.
The material is not well tested on Windows because the lesson authors are Linux/Mac people. Corrections and contributions which make the lesson more general and portable are very much welcome.
You need to install CMake, as well as Fortran, C, and C++ compilers.
To appreciate this material it helps to have some prior exposure to Makefiles and compiled languages but we have also something for the Python/R crowd.
|14:00||Data processing pipeline using Make||
Why do many projects use Makefiles?
How does the make command work?
What are Makefiles composed of?
Why are Makefiles useful for Python and R developers?
I am already using Makefiles, do I need CMake?
What are typical problems with Makefiles?
Why CMake and not Autotools?
I am a Python developer, is any of this relevant for me?
|14:35||Hello-world example using CMake||
How are CMake projects configured and built?
What is an out of source compilation?
|14:55||Exercise: CMake-ify a Tetris game||How to configure and compile a code that you found on the net.|
|15:05||Help||Where can I find help?|
|15:10||Compilers and compiler flags||
How can we select the compiler?
How can we change compiler flags?
|15:15||Exercise: CMake-ify an example project||
What is a typical layout for a CMake framework?
How can we build static and shared libraries?
How can we get version information into the binary output for reproducibility?
How does testing work in CMake?
How can we create an installer and packager?
|16:10||Generators||Can CMake be used with tools and frameworks other than Makefiles?|
|16:15||Conclusions and outlook||
What can we take home?
Any critical views?
What have we skipped?