Skip to content

msclock/cmake-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMake Modules

Include some modules in CMake.

Usage

Common Usage

Normally, the modules can be referred by add to the project module folders and include the needed module.

git clone --depth 1 https://github.com/msclock/cmake-modules.git cmake/cmake-modules

Add to CMAKE_MODULE_PATH and refer the modules.

list(APPEND CMAKE_MODULE_PATH cmake/cmake-modules)
include(cmake-modules/cmake/ProjectDefault) # Entry module for general projects
include(module/path/without/.cmake/suffix) # Include other modules

Use registry

The repo has been registered in the cmake-registry. Here is the usage.

Modules

The modules here are divided into different categories: configuration, build, installation and testing. That means relative modules are applied to relative stages of cmake.

Basically, modules in the repository are collected from opensouces, but maybe modified to enhance generic usage.