scripts: add link to CMake envvars FAQ next to XTENSA_SYSTEM definition

Environment variables like XTENSA_SYSTEM are an absolute CMake
pain. Add a link to the CMake FAQ and a one-line description why.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2022-09-20 17:48:53 +00:00 committed by Liam Girdwood
parent 0b757a594f
commit 5694cfa012
2 changed files with 5 additions and 1 deletions

View File

@ -392,6 +392,8 @@ do
then
TOOLCHAIN=xt
ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf"
# CMake cannot set (evil) build-time environment variables at configure time:
# https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#how-can-i-get-or-set-environment-variables
export XTENSA_SYSTEM=$XTENSA_BUILDS_DIR/$XTENSA_CORE/config
printf 'XTENSA_SYSTEM=%s\n' "${XTENSA_SYSTEM}"
PATH=$XTENSA_TOOLS_DIR/XtensaTools/bin:$OLDPATH

View File

@ -464,7 +464,9 @@ def build_platforms():
print(f"XTENSA_TOOLCHAIN_PATH={XTENSA_TOOLCHAIN_PATH}")
print(f"TOOLCHAIN_VER={TOOLCHAIN_VER}")
# set variables expected by xcc toolchain
# Set variables expected by xcc toolchain. CMake cannot set (evil) build-time
# environment variables at configure time:
# https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#how-can-i-get-or-set-environment-variables
XTENSA_BUILDS_DIR=str(pathlib.Path(xtensa_tools_root_dir, "install", "builds",
TOOLCHAIN_VER).absolute())
XTENSA_SYSTEM = str(pathlib.Path(XTENSA_BUILDS_DIR, XTENSA_CORE, "config").absolute())