-
Notifications
You must be signed in to change notification settings - Fork 3k
CMake: Activate ccache #13834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: Activate ccache #13834
Conversation
@ladislas, thank you for your changes. |
tools/cmake/app.cmake
Outdated
@@ -1,6 +1,12 @@ | |||
# Copyright (c) 2020 ARM Limited. All rights reserved. | |||
# SPDX-License-Identifier: Apache-2.0 | |||
|
|||
find_program(CCACHE "ccache") | |||
if(CCACHE) | |||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alignment fix here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've replace the tab with 4 spaces.
What about adding an .editorconfig to make sure these kinds of styles respected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding an .editorconfig to make sure these kinds of styles respected?
could be. We use astyle currently (not yet checking CMake files, might not even be able to)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also wondering how we could check CMake files for our project, https://github.com/cheshirekow/cmake_format is a good candidate.
With .editorconfig, you "don't check anything", you just define the style. You then install the plugin in your favorite editor and it will use the style you've setup in your config file.
It can be extension based or even file based if needed.
Quick example: https://github.com/ladislas/mbed-cmake-template/blob/master/.editorconfig
I can make a PR to master to start a conversation and discuss the style definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets create an issue, and we can review.
66ca613
to
44da292
Compare
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
This PR activates ccache for CMake builds as discussed here in #13477.
#13477 (comment)
It replaces #13824
It also changes the Travis config for ccache to follow Travis' guidelines
https://docs.travis-ci.com/user/caching/#ccache-cache
This part can be removed if needed.
Impact of changes
Faster build time for users and for CI.
Migration actions required
n/a
Documentation
Documentation should tell users to install ccache on their computer or CI system to benefit from the change.
Pull request type
Test results
Reviewers
@0xc0170 @hugueskamba @rajkan01