[CMake] ExternalProject, continuous integration and caching builds

Antoine Pitrou antoine at python.org
Wed Sep 5 08:37:45 EDT 2018


Le 05/09/2018 à 14:28, Craig Scott a écrit :
> 
> 
> On Wed, Sep 5, 2018 at 9:56 PM, Antoine Pitrou <antoine at python.org
> <mailto:antoine at python.org>> wrote:
> 
> 
>     Hello,
> 
>     On our project (Apache Arrow - https://arrow.apache.org/) we're using
>     CMake for the C++ source tree and have many external dependencies
>     fetched using ExternalProject.  In turn building those dependencies can
>     make up a significant portion of build times on CI services, especially
>     AppVeyor.  So I've been looking for a solution to cache those
>     third-party builds from one CI run to the other.
> 
>     Right now, what I'm trying to do is to set EP_BASE to a well-known base
>     directory and ask AppVeyor to cache and restore that directory in each
>     new build.  The AppVeyor caching seems to work fine (the EP_BASE
>     directory is saved and restored).  However, it seems that nevertheless
>     CMake will rebuild all those projects again, despite the cached build
>     results.
> 
> 
> When AppVeyor restores the cached directories and files, does it also
> preserve their timestamps? If not, that might explain why it always
> rebuilds.

I do not know.  I've found out this utility:
https://github.com/iboB/mtime_cache and will experiment with it.

Regards

Antoine.


More information about the CMake mailing list