Help: Add that CMAKE_CACHEFILE_DIR might not be defined

CMake only sets `CMAKE_CACHEFILE_DIR` when writing `CMakeCache.txt`,
so the variable will usually be undefined when `CMakeLists.txt` runs.
Revise its documentation to clarify that `CMAKE_BINARY_DIR` should
be used instead.
This commit is contained in:
Tobias Nießen
2022-03-29 23:49:29 +00:00
committed by Brad King
parent 00677703d0
commit cf4100d7da

View File

@@ -1,7 +1,6 @@
CMAKE_CACHEFILE_DIR
-------------------
The directory with the ``CMakeCache.txt`` file.
This is the full path to the directory that has the ``CMakeCache.txt``
file in it. This is the same as :variable:`CMAKE_BINARY_DIR`.
This variable is used internally by CMake, and may not be set during
the first configuration of a build tree. When it is set, it has the
same value as :variable:`CMAKE_BINARY_DIR`. Use that variable instead.