Browse Source

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.
Tobias Nießen 3 years ago
parent
commit
cf4100d7da
1 changed files with 3 additions and 4 deletions
  1. 3 4
      Help/variable/CMAKE_CACHEFILE_DIR.rst

+ 3 - 4
Help/variable/CMAKE_CACHEFILE_DIR.rst

@@ -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.