When executing code inside a function(), this variable contains the full directory of the listfile defining the current function.
It is quite common practice in CMake that modules use some additional files (e.g., templates to render). And the code typically did the following:
Using this variable inside a function eliminates the neccessity of the additional one with “global” scope: