common: correctly unset build_option_* variables
We can use the bash feature ${!prefix@}/${!prefix*} which expands to all variables with the prefix. This avoids leaking build_options between sourced templates.
This commit is contained in:
parent
4d457bf911
commit
11c93a1e79
|
@ -21,6 +21,9 @@ unset -v CFLAGS CXXFLAGS FFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH
|
||||||
unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF PKG_CONFIG
|
unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF PKG_CONFIG
|
||||||
unset -v CMAKE_GENERATOR
|
unset -v CMAKE_GENERATOR
|
||||||
|
|
||||||
|
# unset all $build_option_ variables
|
||||||
|
unset -v "${!build_option_@}"
|
||||||
|
|
||||||
# hooks/do-extract/00-distfiles
|
# hooks/do-extract/00-distfiles
|
||||||
unset -v skip_extraction
|
unset -v skip_extraction
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue