In this chapter, we will cover the following recipes:
- Code reuse with functions and macros
- Splitting CMake sources into modules
- Writing a function to test and set compiler flags
- Defining a function or macro with named arguments
- Redefining functions and macros
- Deprecating functions, macros, and variables
- Limiting scope with add_subdirectory
- Avoiding global variables using target_sources
- Organizing Fortran projects