diff options
author | Brad King <brad.king@kitware.com> | 2008-06-26 14:58:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-26 14:58:44 (GMT) |
commit | d8e05b43a1fc0370aa3ac84f4209b1b942809b89 (patch) | |
tree | bf36098892b3724010be9a6a1914ea4d54ca083d /Source | |
parent | 2ca9a70fd1812ebcf48b07642b73b4e227cd628b (diff) | |
download | CMake-d8e05b43a1fc0370aa3ac84f4209b1b942809b89.zip CMake-d8e05b43a1fc0370aa3ac84f4209b1b942809b89.tar.gz CMake-d8e05b43a1fc0370aa3ac84f4209b1b942809b89.tar.bz2 |
ENH: Update documentation of computed directory properites.
- Fix documentation of get_directory_property command.
- Convert its list of computed directory properties to be
defined/documented directory properties.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGetDirectoryPropertyCommand.h | 27 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 60 |
2 files changed, 74 insertions, 13 deletions
diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index 542cf4c..081bf79 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -49,7 +49,7 @@ public: */ virtual const char* GetTerseDocumentation() { - return "Get a property of the directory."; + return "Get a property of DIRECTORY scope."; } /** @@ -58,17 +58,20 @@ public: virtual const char* GetFullDocumentation() { return - " get_directory_property(VAR [DIRECTORY dir] property)\n" - "Get a property from the Directory. The value of the property is " - "stored in the variable VAR. If the property is not found, " - "CMake will report an error. The properties include: VARIABLES, " - "CACHE_VARIABLES, COMMANDS, MACROS, INCLUDE_DIRECTORIES, " - "LINK_DIRECTORIES, DEFINITIONS, INCLUDE_REGULAR_EXPRESSION, " - "LISTFILE_STACK, PARENT_DIRECTORY, and " - "DEFINITION varname. If the DIRECTORY argument is provided then " - "the property of the provided directory will be retrieved " - "instead of the current directory. You can only get properties " - "of a directory during or after it has been traversed by cmake."; + " get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)\n" + "Store a property of directory scope in the named variable. " + "If the property is not defined the empty-string is returned. " + "The DIRECTORY argument specifies another directory from which " + "to retrieve the property value. " + "The specified directory must have already been traversed by " + "CMake." + "\n" + " get_directory_property(<variable> [DIRECTORY <dir>]\n" + " DEFINITION <var-name>)\n" + "Get a variable definition from a directory. " + "This form is useful to get a variable definition from another " + "directory." + ; } cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b02e2c8..7d999a1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3191,7 +3191,7 @@ void cmMakefile::DefineProperties(cmake *cm) "in your CMake scripts. It returns a list of what list files " "are currently being processed, in order. So if one listfile " "does an INCLUDE command then that is effectively pushing " - "the included listfile onto the stack."); + "the included listfile onto the stack.", false); cm->DefineProperty ("TEST_INCLUDE_FILE", cmProperty::DIRECTORY, @@ -3260,6 +3260,64 @@ void cmMakefile::DefineProperties(cmake *cm) "for example typing make will cause the targets to be built. " "The same concept applies to the default build of other generators.", false); + + cm->DefineProperty + ("PARENT_DIRECTORY", cmProperty::DIRECTORY, + "Source directory that added current subdirectory.", + "This read-only property specifies the source directory that " + "added the current source directory as a subdirectory of the build. " + "In the top-level directory the value is the empty-string.", false); + + cm->DefineProperty + ("INCLUDE_REGULAR_EXPRESSION", cmProperty::DIRECTORY, + "Include file scanning regular expression.", + "This read-only property specifies the regular expression used " + "during dependency scanning to match include files that should " + "be followed. See the include_regular_expression command.", false); + + cm->DefineProperty + ("VARIABLES", cmProperty::DIRECTORY, + "List of variables defined in the current directory.", + "This read-only property specifies the list of CMake variables " + "currently defined. " + "It is intended for debugging purposes.", false); + + cm->DefineProperty + ("CACHE_VARIABLES", cmProperty::DIRECTORY, + "List of cache variables available in the current directory.", + "This read-only property specifies the list of CMake cache " + "variables currently defined. " + "It is intended for debugging purposes.", false); + + cm->DefineProperty + ("MACROS", cmProperty::DIRECTORY, + "List of macro commands available in the current directory.", + "This read-only property specifies the list of CMake macros " + "currently defined. " + "It is intended for debugging purposes. " + "See the macro command.", false); + + cm->DefineProperty + ("DEFINITIONS", cmProperty::DIRECTORY, + "For CMake 2.4 compatibility only. Use COMPILE_DEFINITIONS instead.", + "This read-only property specifies the list of flags given so far " + "to the add_definitions command. " + "It is intended for debugging purposes. " + "Use the COMPILE_DEFINITIONS instead.", false); + + cm->DefineProperty + ("INCLUDE_DIRECTORIES", cmProperty::DIRECTORY, + "List of preprocessor include file search directories.", + "This read-only property specifies the list of directories given " + "so far to the include_directories command. " + "It is intended for debugging purposes.", false); + + cm->DefineProperty + ("LINK_DIRECTORIES", cmProperty::DIRECTORY, + "List of linker search directories.", + "This read-only property specifies the list of directories given " + "so far to the link_directories command. " + "It is intended for debugging purposes.", false); } //---------------------------------------------------------------------------- |