Cable: CMake Bootstrap Library
Cable is a set of CMake modules and scripts containing common patterns used in CMake-based C++ projects. The design goal is to be pragmatic rather than generic so the number of provided options is minimal. The Cable modules are independent and it is easy to use them individually.
Adding a dependency project as a git subtree is just a copy of the source code done in a bit more systematic way.
If you are not familiar with managing dependencies with git subtree read the Git subtree: the alternative to Git submodule.
git remote add cable https://github.com/ethereum/cable
git subtree add --prefix cmake/cable cable master --squashInclude the Cable library as git submodule in your project. The suggested
submodule location is cmake/cable relative to your project root directory.
git submodule add https://github.com/ethereum/cable cmake/cableCable contains the bootstrap.cmake file that initializes the library.
Start by including this file in your main CMakeLists.txt from the Cable
submodule/subtree or any other location. The bootstrap.cmake must be included
before the project() command. After that, you can include and use other
Cable modules.
cmake_minimum_required(VERSION 3.5)
include(cmake/cable/bootstrap.cmake)
include(CableBuildType)
project(tothemoon)
cable_set_build_type(DEFAULT RelWithDebInfo CONFIGURATION_TYPES Debug Release RelWithDebInfo)Paweł Bylica @chfast
Licensed under the Apache License, Version 2.0.