I might be googling wrongly, but I'm unable to find what's the purpose of .cmake files.
I've just stumbled across the CMake tool for a project I've to work with and I'm having a hard time to understand how it works. I do understand that running the CMake command in a directory containing a CMakeLists.txt
executes the commands in that file (along with the commands in the CMakeLists.txt
contained in the sub-directories) but the purpose of .cmake files is a lot more fuzzy.
It seems that they are used to define functions/set variables that are thereafter used in the CMakeLists.txt
but I'm not sure. How are they used by the CMake tool ?