Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
buildinfo/ | H | 09-Jul-2019 | - | |||
defaults/ | H | 09-Jul-2019 | - | |||
toolchains/ | H | 09-Jul-2019 | - | |||
.gitignore | H A D | 09-Jul-2019 | 7 | |||
CableBuildInfo.cmake | H A D | 09-Jul-2019 | 3.2 KiB | |||
CableBuildType.cmake | H A D | 09-Jul-2019 | 1.4 KiB | |||
CableCompilerSettings.cmake | H A D | 09-Jul-2019 | 6.1 KiB | |||
CablePackage.cmake | H A D | 09-Jul-2019 | 792 | |||
CableToolchains.cmake | H A D | 09-Jul-2019 | 1 KiB | |||
HunterGate.cmake | H A D | 09-Jul-2019 | 16.3 KiB | |||
LICENSE | H A D | 09-Jul-2019 | 11.1 KiB | |||
README.md | H A D | 09-Jul-2019 | 2.4 KiB | |||
bootstrap.cmake | H A D | 09-Jul-2019 | 2 KiB |
README.md
1# Cable 2 3[![readme style: standard][readme style standard badge]][standard readme] 4 5> Cable: CMake Bootstrap Library 6 7Cable is a set of CMake modules and scripts containing common patterns used 8in CMake-based C++ projects. The design goal is to be pragmatic rather than 9generic so the number of provided options is minimal. The Cable modules are 10independent and it is easy to use them individually. 11 12 13## Table of Contents 14 15- [Install](#install) 16- [Usage](#usage) 17- [Maintainer](#maintainer) 18- [License](#license) 19 20 21## Install 22 23The suggested Cable location is `cmake/cable` relative to your project root directory. 24 25### As git subtree 26 27Adding a dependency project as a [git subtree] is just a copy of the source code 28done in a bit more systematic way. 29 30If you are not familiar with managing dependencies with git subtree read the 31[Git subtree: the alternative to Git submodule][git subtree tutorial]. 32 33#### To install 34 35```sh 36git remote add cable https://github.com/ethereum/cable 37git subtree add --prefix cmake/cable cable master --squash 38``` 39 40#### To update 41 42```sh 43git subtree pull --prefix cmake/cable cable master --squash 44``` 45 46### As git submodule 47 48Include the Cable library as [git submodule] in your project. 49 50```sh 51git submodule add https://github.com/ethereum/cable cmake/cable 52``` 53 54## Usage 55 56Cable contains the `bootstrap.cmake` file that initializes the library. 57Start by including this file in your main `CMakeLists.txt` from the Cable 58submodule/subtree or any other location. The `bootstrap.cmake` must be included 59before the `project()` command. After that, you can include and use other 60Cable modules. 61 62### Example 63 64```cmake 65cmake_minimum_required(VERSION 3.5) 66 67include(cmake/cable/bootstrap.cmake) 68include(CableBuildType) 69 70project(tothemoon) 71 72cable_set_build_type(DEFAULT RelWithDebInfo CONFIGURATION_TYPES Debug Release RelWithDebInfo) 73``` 74 75 76## Maintainer 77 78Paweł Bylica [@chfast] 79 80## License 81 82Licensed under the [Apache License, Version 2.0]. 83 84 85[@chfast]: https://github.com/chfast 86[Apache License, Version 2.0]: LICENSE 87[git submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules 88[git subtree]: https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt 89[git subtree tutorial]: https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree 90[standard readme]: https://github.com/RichardLitt/standard-readme 91 92[readme style standard badge]: https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square 93