Cmake gives this warning when building one third-party script:
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHA
In case you get this message with CLion after you set the
-DCMAKE_TOOLCHAIN_FILE=xxx option, you'll want to delete all the CMake build directories.
Do
Tools-> CMake -> Show Generated CMake Files in File Manager
then delete all build directories. Then do
Tools-> CMake -> Reload the CMake Project
Once you do this, you will still get the warning, but at least it will be observed the first time cmake is run.