Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thelartians/ccache.cmake
🚅 Compile faster with Ccache! A Ccache integration for CMake with Xcode support.
https://github.com/thelartians/ccache.cmake
c cache caching ccache cmake compilation compiler cpp fast xcode
Last synced: 15 days ago
JSON representation
🚅 Compile faster with Ccache! A Ccache integration for CMake with Xcode support.
- Host: GitHub
- URL: https://github.com/thelartians/ccache.cmake
- Owner: TheLartians
- License: mit
- Created: 2019-10-14T12:19:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-17T20:59:25.000Z (about 1 year ago)
- Last Synced: 2024-10-10T12:35:14.948Z (27 days ago)
- Topics: c, cache, caching, ccache, cmake, compilation, compiler, cpp, fast, xcode
- Language: CMake
- Homepage:
- Size: 15.6 KB
- Stars: 58
- Watchers: 7
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Actions Status](https://github.com/TheLartians/Ccache.cmake/workflows/CI/badge.svg)](https://github.com/TheLartians/Ccache.cmake/actions)
# Ccache.cmake
A simple, Xcode compatible _Ccache_ integration for _CMake_, based on [this](https://crascit.com/2016/04/09/using-ccache-with-cmake) article by Craig Scott.
## About[Ccache](https://ccache.dev) is a compiler cache that can drastically improve build times for C and C++ projects.
This script makes it easy to configure a CMake project to use Ccache by adding the configuration option `USE_CCACHE` which will active Ccache support when enabled.
Build-specific environmental variables can be set with the `CCACHE_OPTIONS` configuration parameter.
It is currently compatible with _Makefile_, _Ninja_ and _Xcode_ generators.
Example usage:```bash
cmake . -DUSE_CCACHE=YES -DCCACHE_OPTIONS="CCACHE_CPP2=true;CCACHE_SLOPPINESS=clang_index_store"
```## How to integrate
### Using [CPM.cmake](https://github.com/TheLartians/CPM) (recommended)
Run the following from the project's root directory to add CPM to your project.
```bash
mkdir -p cmake
wget -O cmake/CPM.cmake https://raw.githubusercontent.com/TheLartians/CPM/master/cmake/CPM.cmake
```Add the following lines to the project's `CMakeLists.txt` after calling `project(...)`.
```CMake
include(cmake/CPM.cmake)CPMAddPackage(
NAME Ccache.cmake
GITHUB_REPOSITORY TheLartians/Ccache.cmake
VERSION 1.2
)
```### Using git submodules (not suited for libraries)
Run the following from the project's root directory.
```bash
git submodule add https://github.com/TheLartians/Ccache.cmake
```In add the following lines to the project's `CMakeLists.txt` after calling `project(...)`.
```CMake
add_subdirectory(Ccache.cmake)
```## Dependencies
Ccache.cmake requires CMake and [_Ccache_](https://ccache.dev).