Getting ready

In this example, we will use three files:

.├── cmake│   ├── custom.cmake│   └── include_guard.cmake└── CMakeLists.txt

The custom custom.cmake module contains the following code:

include_guard(GLOBAL)  message(STATUS "custom.cmake is included and processed")

We will discuss cmake/include_guard.cmake and CMakeLists.txt later.

Get CMake Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.