History log of /seL4-test-master/tools/seL4/cmake-tool/helpers/memoize.cmake
Revision Date Author Comments
# 9f904ed2 06-Mar-2020 Gerwin Klein <gerwin.klein@data61.csiro.au>

convert license headers to SPDX

Includes license review of 3rd-party files, adding missing upstream
headers, and moving the UNSW OZPLB license into its own file rather
than replicating it in the header.


# 69494770 08-Dec-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

trivial: Add quotes to string comparison


# 14918280 27-Nov-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

cmake,memoize: Check empty path before absolute

If SEL4_CACHE_DIR wasn't set then a check to IS_ABSOLUTE would return
false, causing an attempted conversion from a relative path to absolute
path and set the cache dir to the top of the build directory. Checking
if the path is empty initially and then avoiding the conversion, leaves
the string empty.


# f0ecd967 26-Nov-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

memoize: Use git diff instead of diff-index

diff-index sometimes returns a non-zero index code if it doesn't know
what the index state is. diff checks the index when generating the
differences so will give a more reliable result.


# 57500177 26-Nov-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

add CMake level memoization of build rules

Add memoize_add_custom_command function which is intended to replace
complex add_custom_command calls and provide a memoization feature where
the results of the rule are stored in an external cache. Future builds
will be able to reuse the artifacts from the cache if the command can
infer that the inpur arguments are the same.

SEL4_CACHE_DIR can either be set in the environment or passed in to
CMake with -DSEL4_CACHE_DIR=path-to-cache-dir. IF SEL4_CACHE_DIR is not
set then the cache won't be used and this feature should have no effect.