CMake Fundamentals Part 5

CMake Fundamentals Part 5

In this part of the series, I demonstrate the use of interface libraries for managing compiler configuration flags. I also introduce the include command.

CMake Fundamentals Part 5

CMake Variable Guidelines

CMake exposes a large set of built-in variables that provide the user with information about the project’s structure. Some of these variables – like CMAKE_SOURCE_DIR and PROJECT_SOURCE_DIR – may seem redundant, and the choice between the two not immediately obvious. In this post, I attempt to define a small set of guidelines that should help choose the right variable in a given context.

CMake Fundamentals Part 5

CMake Functions and Macros

CMake provides the most basic abstraction facilities – functions and macros. In this post, I discuss how to use both, with an example of utilizing cmake_parse_arguments to achieve built-in-like interfaces.

Testing threadsafe code

Testing threadsafe code

In this post we explore a piece of testing utility code that can make writing tests for multithreaded code a little less cumbersome. The implementation involves a dash of metaprogramming. You have been warned.

CMake Fundamentals Part 5

CMake Fundamentals Part 1

CMake is the predominant meta build system used for C++ projects, making it a required tool in every C++ developer’s skill set. Let’s review some of the fundamental concepts.