autobuild3 allows maintainers to specify one or more VARIABLE__AMD64 (by archtecture) and VARIABLE__RETRO (by arch group). These variables will override VARIABLE if the current building arch matches the more specific flags.
Earlier in #130 support is added to allow variables (e.g. CMAKE_AFTER) to be defined as a bash indexed array. However, at this point overriding CMAKE_AFTER-as-an-array with a literal CMAKE_AFTER__ARM64 or the other way around is messed up and let's say undefined behavior.
This PR adds a short hand abcopyvar that enforces identical types for source and destination variables when copy-assigning, and causes build to fail if types don't match, i.e. when VAR_AMD64 is an array but VAR is a string literal, or when VAR_AMD64 is a string literal but VAR is an array. Existing copy-assignment should be changed to use this function instead.
autobuild3 allows maintainers to specify one or more
VARIABLE__AMD64
(by archtecture) andVARIABLE__RETRO
(by arch group). These variables will overrideVARIABLE
if the current building arch matches the more specific flags.Earlier in #130 support is added to allow variables (e.g.
CMAKE_AFTER
) to be defined as a bash indexed array. However, at this point overridingCMAKE_AFTER
-as-an-array with a literalCMAKE_AFTER__ARM64
or the other way around is messed up and let's say undefined behavior.This PR adds a short hand
abcopyvar
that enforces identical types for source and destination variables when copy-assigning, and causes build to fail if types don't match, i.e. when VAR_AMD64 is an array but VAR is a string literal, or when VAR_AMD64 is a string literal but VAR is an array. Existing copy-assignment should be changed to use this function instead.