summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2010-09-28 20:09:14 (GMT)
committerAlex Neundorf <neundorf@kde.org>2010-09-28 20:10:47 (GMT)
commit41e4f1a2109cc03008ef0d1db5cab1c9345866e3 (patch)
tree588fe929d70a87772f0cf48a3295cdef4bb5e489 /Source/cmDocumentVariables.cxx
parentf9fc79cac54b1d97afb65075b949bac264961439 (diff)
downloadCMake-41e4f1a2109cc03008ef0d1db5cab1c9345866e3.zip
CMake-41e4f1a2109cc03008ef0d1db5cab1c9345866e3.tar.gz
CMake-41e4f1a2109cc03008ef0d1db5cab1c9345866e3.tar.bz2
Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
Comes with a simple test and docs. Alex
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index a1fb064..a877680 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -78,6 +78,25 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Variables that Provide Information");
cm->DefineProperty
+ ("CMAKE_CURRENT_LIST_DIR", cmProperty::VARIABLE,
+ "Full directory of the listfile currently being processed.",
+ "As CMake processes the listfiles in your project this "
+ "variable will always be set to the directory where the listfile which "
+ "is currently being processed (CMAKE_CURRENT_LIST_FILE) is located. "
+ "The value has dynamic scope. "
+ "When CMake starts processing commands in a source file "
+ "it sets this variable to the directory where this file is located. "
+ "When CMake finishes processing commands from the file it "
+ "restores the previous value. "
+ "Therefore the value of the variable inside a macro or "
+ "function is the directory of the file invoking the bottom-most entry on "
+ "the call stack, not the directory of the file containing the macro or "
+ "function definition."
+ "\n"
+ "See also CMAKE_CURRENT_LIST_FILE.",false,
+ "Variables that Provide Information");
+
+ cm->DefineProperty
("CMAKE_BUILD_TOOL", cmProperty::VARIABLE,
"Tool used for the actual build process.",
"This variable is set to the program that will be"