Use this tag for questions regarding CMake modules that are part of the CMake distribution, or loading custom CMake modules into the current CMake context.
CMake Modules are CMake source files (typically .cmake
files) that can be loaded into the current context using the include()
command. CMake provides many modules that can be used out-of-the-box; these are split into two general types:
- Utility modules
- Find modules
Utility modules are loaded using the include()
command, while Find modules are loaded by calling the find_package()
command. Custom user-defined modules can also be written and loaded in a similar manner, but their location must be specified in the CMAKE_MODULE_PATH
variable.