• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

buildinfo/H09-Jul-2019-

defaults/H09-Jul-2019-

toolchains/H09-Jul-2019-

.gitignoreH A D09-Jul-20197

CableBuildInfo.cmakeH A D09-Jul-20193.2 KiB

CableBuildType.cmakeH A D09-Jul-20191.4 KiB

CableCompilerSettings.cmakeH A D09-Jul-20196.1 KiB

CablePackage.cmakeH A D09-Jul-2019792

CableToolchains.cmakeH A D09-Jul-20191 KiB

HunterGate.cmakeH A D09-Jul-201916.3 KiB

LICENSEH A D09-Jul-201911.1 KiB

README.mdH A D09-Jul-20192.4 KiB

bootstrap.cmakeH A D09-Jul-20192 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