Find Modules¶
FindClangFormat¶
A CMake find module used to find the
ClangFormat code formatter. This module provides
access to the clang-format executable via CMake targets and variables. When a version is provided
to find_package(), this find-module will also consider version-suffixed clang-format
executables. See Examples below.
Clang offers a config-file package, which can be used to locate ClangFormat from CMake. However, this requires having the dev packages of LLVM & Clang installed. Additionally, LLVM often isn’t a dependency of Clang(Format) packages, which are frequently distributed independently.
Cache Variables¶
ClangFormat_EXECUTABLEPath to found clang-foramt executable
Result Variables¶
ClangFormat_FOUNDTrue if the clang-format executable was found
ClangFormat_VERSIONThe found version, where version is in the form <major>.<minor>.<patch>
ClangFormat_VERSION_MAJORThe found major version
ClangFormat_VERSION_MINORThe found minor version
ClangFormat_VERSION_PATCHThe found patch version
Imported Targets¶
- clang::format
The clang-format executable, as an imported CMake target
Examples¶
find_package(ClangFormat)
# considers executables "clang-format-14.0" and "clang-format-14" before "clang-format"
find_package(ClangFormat 14.0 REQUIRED)
Findliburing¶
A CMake find module used to find the
installed liburing Linux library. This module provides access
to the liburing library via CMake targets and variables. This module does not take the target system
(CMAKE_SYSTEM_NAME link) into account. To avoid
searching for liburing on non-Linux machines, explicitly wrap the
find_packge(liburing) call in a condition.
Cache Variables¶
None
Result Variables¶
liburing_VERSIONThe found liburing library version in the form <major>.<minor>
liburing_VERSION_MAJORThe found liburing library major version as a single integer
liburing_VERSION_MINORThe found liburing library minor version as a single integer
Imported Targets¶
- liburing::liburing
The liburing library and usage requirements bundled as a CMake target. Has the INTERFACE_INCLUDE_DIRECTORIES and IMPORTED_LOCATION properties set.
Examples¶
find_package(liburing REQUIRED)
target_link_libraries(mylib PRIVATE liburing::liburing)
find_package(liburing 2.1...2.11 REQUIRED)
FindSphinx¶
A CMake find module used to find the Sphinx documentation generator. Sphinx provides an executable to build documentation, commonly called sphinx-build. This module provides access to it, or similarly named executables, via CMake targets and variables.
Cache Variables¶
Sphinx_EXECUTABLEPath to found sphinx build executable
Result Variables¶
Sphinx_FOUNDTrue if the sphinx build executable was found
Sphinx_VERSIONThe found sphinx version, where version is in the form <major>.<minor>.<patch>
Sphinx_VERSION_MAJORThe found sphinx major version
Sphinx_VERSION_MINORThe found sphinx minor version
Sphinx_VERSION_PATCHThe found sphinx patch version
Imported Targets¶
- Sphinx::build
The sphinx build executable (sphinx-build, sphinx-build2, sphinx-build3)
Examples¶
find_package(Sphinx REQUIRED)