Skip to content
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

CPM instead of FetchContent and ccache for ultra fast build #1696

Merged
merged 31 commits into from
Jun 5, 2023
Merged

Conversation

dcoeurjo
Copy link
Member

@dcoeurjo dcoeurjo commented May 10, 2023

PR Description

CPM

Fetching deps is now done with CPM (faster than FetchContent). Furthermore, if you add

 export CPM_SOURCE_CACHE=$HOME/.cache/CPM

to your .bashrc ou .zshrc, CPM will cache the downloads.

CCache

When you have installed ccache on your system, the USE_CCACHE=yes cmake option enables it for the DGtal build. The first build has a small overhead but the other builds will be extremely fast (when iterating with make clean; make).

For instance (with examples):

  • with ccache, after the first build: make 11,66s user 8,42s system 102% cpu 19,618 total
  • without : make 287,18s user 20,38s system 99% cpu 5:08,66 total 

cmake-ccache enabled using the CPM.cmake framework (more to come).

Checklist

  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug mode.
  • All continuous integration tests pass (Github Actions & appveyor)

@dcoeurjo dcoeurjo changed the title Ultra fast build for dev using CCACHE CPM instead of FetchContent and ccache for ultra fast build May 13, 2023
@dcoeurjo
Copy link
Member Author

Still failing because of PythonTest but all c++ builds are fine. Ready to review.

@dcoeurjo
Copy link
Member Author

Ping @kerautret @JacquesOlivierLachaud could please have a quick look?

@dcoeurjo dcoeurjo requested a review from kerautret May 29, 2023 20:30
@dcoeurjo
Copy link
Member Author

dcoeurjo commented Jun 5, 2023

Ok selfmerging

@dcoeurjo dcoeurjo merged commit e054de1 into master Jun 5, 2023
@dcoeurjo dcoeurjo deleted the cpmccache branch June 5, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant