How do I set up a CMAKE_TOOLCHAIN_FILE toolchain file

I am cross-compiling on x86 for aarch64 target.

I use ${CMAKE_HOST_SYSTEM_PROCESSOR} currently to detect the host processor,
and set variables accordingly, but I would like instead to use the target processor
in my CMakeLists.txt file.