c++

Complete walkthrough: Adding CMake to an existing library

In this article, we will explore how we can take two libraries we have developed before on this website (namely the linear algebra solver library and the mesh reader library) and add CMake scripts to them to fully automate the compilation and deployment stages from configuring the project to compilation, testing, documentation generation, installation, and …

Complete walkthrough: Adding CMake to an existing library Read More »

How to use CMake/CPack to create beautiful GUI-installers

In this article, we look at the CMake utility tool CPack, which helps us package our libraries and executables generated by CMake into a nice and easy-to-use graphical user interface to guide users through the installation process. Windows users will be familiar with these graphical user interfaces for installation, where we can select an installation …

How to use CMake/CPack to create beautiful GUI-installers Read More »

Never worry about Docs again! Automate it with CMake instead

In this article, we will talk about the d word again; documentation. I know, most developers find open-heart surgery more appealing that having to write documentation for their own code, but it is an integral part of software engineering and ensuring other users can work with your software. I wouldn’t do you a favour by …

Never worry about Docs again! Automate it with CMake instead Read More »

How to automate testing with CMake, CTest, and gtest

In this article, we will have a look at how we can integrate unit, integration, and system tests with CMake. We will see that CMake comes with additional helper utilities, one of which is CTest. We use CMake to register all tests and then compile them into individual executables, and we use CTest to run …

How to automate testing with CMake, CTest, and gtest Read More »

How to add external libraries into your CFD solver using CMake

After having reviewed how to compile your own library with CMake in the previous article, including what steps to take so that other people can consume your library in their project, we reverse the role in this article and look at how we can use someone else’s library in our project. In the process, we …

How to add external libraries into your CFD solver using CMake Read More »

How to compile, install, and use custom libraries with CMake

In this article, we will look at how we can use CMake to compile and install a library we have developed, be it a static, dynamic, or header-only library. We look at all the steps we need to take to make the installation successful, which will contain steps to automatically generate files that other projects …

How to compile, install, and use custom libraries with CMake Read More »

Advanced CMake features to power up your CFD development

In this article, we look at some more advanced concepts in CMake that will help you automate your build process from start to end. We first look at programming with variables, conditional statements, and loops, and then look at functions and macros, configure files, generator expressions, and finally policies. If you master these concepts, you …

Advanced CMake features to power up your CFD development Read More »

How to use Makefiles to automate CFD solver compilations

In this article, we take a look at automating the software build stage using build and systems. We look at what options are available to us and why CMake, in particular, stands out as the most suitable choice for build automation. It enjoys the largest user base among all build systems, and chances are that …

How to use Makefiles to automate CFD solver compilations Read More »