|
|
# CMake Files
|
|
|
|
|
|
[CMake](https://cmake.org/) is a great tool to configure software builds.
|
|
|
We use the code checker [cmake-lint](https://github.com/richq/cmake-lint) to check the CMake files in our projects.
|
|
|
You can install `cmake-lint` via pip. During the build configuartion of `C-M.E.S.S.` the programm `cmakelint` is searched. If the programm `cmakelint` was found then you see a message like this:
|
|
|
|
|
|
![Auswahl_002](/uploads/fdfb99f3044dbcc5e0fc572821f20485/Auswahl_002.png)
|
|
|
|
|
|
After build configuration you can use the command `make cmess-cmakelint` it will check all CMake files in the project and report style issues. We use the `cmakelint.rc` configuration file, found in the root directory of the C-M.E.S.S.
|
|
|
sources.
|
|
|
If you are a `vim` user here some useful settings:
|
|
|
|
|
|
|
|
|
```
|
|
|
Plugin 'scrooloose/syntastic'
|
|
|
let g:syntastic_cmake_cmakelint_args = '--spaces=4 --config=/home/daniels/cmess/cmakelint.rc'
|
|
|
|
|
|
```
|
|
|
|