CMAKE_TOOLCHAIN_FILE documentation unclear
I've read https://cmake.org/cmake/help/v3.14/variable/CMAKE_TOOLCHAIN_FILE.html?highlight=cmake_toolchain_file and https://cmake.org/cmake/help/v3.14/manual/cmake-toolchains.7.html#cross-compiling
Question: is there documentation on what is allowed to be in a toolchain file? Which variables are set? Which commands can I use? Can I set add_definitions()
or are just variables allowed? Which information is available to be used in the toolchain file? Which variables can I set and are used by cmake?
Complaint: The toolchains documentation is rather confusing. I was looking for information on how to use the CMAKE_TOOLCHAIN_FILE to set some compile flags for all of my builds and just above the cross compiling section is the toolchain-features section where try_compile
is said to be available. Happy to have a way to ask a few compile feature from my compiler to not have a load of very similar toolchain files I tried to use it and it fails. It is not immediately clear that the cmake-toolchains
documentation page isn't about CMAKE_TOOLCHAIN_FILE