Toolchains and presets

Is there a way to access variables specified in the toolchain file passed via the --toolchain or -DCMAKE_TOOLCHAIN_FILE from a preset?

I don’t think so as presets can define toolchain files.

Cc: @kyle.edwards

Presets cannot access (read) any CMake variables, they can only define them.

Also note that presets are evaluated by more than just CMake. They are read and processed by tools, IDEs, etc. It would be unreasonable for presets to rely on information that would require any sort of CMake language parser.