From cf4100d7da85e714df727cebd591124486a026ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 29 Mar 2022 23:49:29 +0000 Subject: 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. --- Help/variable/CMAKE_CACHEFILE_DIR.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Help/variable/CMAKE_CACHEFILE_DIR.rst b/Help/variable/CMAKE_CACHEFILE_DIR.rst index 8604d0e..3fee09f 100644 --- a/Help/variable/CMAKE_CACHEFILE_DIR.rst +++ b/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. -- cgit v0.12