cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variable

When no `CMAKE_TOOLCHAIN_FILE` is explicitly specified while creating
a new build tree, check for an environment variable of the same name.
This commit is contained in:
Brad King
2021-06-03 08:32:44 -04:00
parent 9c33ff4dda
commit 6c34ed9b87
17 changed files with 86 additions and 0 deletions
+3
View File
@@ -10,3 +10,6 @@ platform and compiler related information.
Relative paths are allowed and are interpreted first as relative to the
build directory, and if not found, relative to the source directory.
This is initialized by the :envvar:`CMAKE_TOOLCHAIN_FILE` environment
variable if it is set when a new build tree is first created.