Update the documentation regarding INCLUDE_DIRECTORIES.

It is now a target property and is affected by the use
of the include_directories command.
This commit is contained in:
David Cole 2012-02-22 14:30:00 -05:00
parent d899eb71b5
commit 8233636dbe
3 changed files with 51 additions and 10 deletions

View File

@ -58,13 +58,21 @@ public:
{
return
" include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)\n"
"Add the given directories to those searched by the compiler for "
"include files. By default the directories are appended onto "
"the current list of directories. This default behavior can be "
"changed by setting CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. "
"By using BEFORE or AFTER you can select between appending and "
"prepending, independent from the default. "
"If the SYSTEM option is given the compiler will be told that the "
"Add the given directories to those the compiler uses to search "
"for include files. "
"These directories are added to the directory property "
"INCLUDE_DIRECTORIES for the current CMakeLists file. "
"They are also added to the target property INCLUDE_DIRECTORIES "
"for each target in the current CMakeLists file. "
"The target property values are the ones used by the generators."
"\n"
"By default the directories are appended onto the current list of "
"directories. "
"This default behavior can be changed by setting "
"CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. "
"By using AFTER or BEFORE explicitly, you can select between "
"appending and prepending, independent of the default. "
"If the SYSTEM option is given, the compiler will be told the "
"directories are meant as system include directories on some "
"platforms.";
}

View File

@ -3860,9 +3860,22 @@ void cmMakefile::DefineProperties(cmake *cm)
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);
"This property specifies the list of directories given "
"so far to the include_directories command. "
"This property exists on directories and targets. "
"In addition to accepting values from the include_directories "
"command, values may be set directly on any directory or any "
"target using the set_property command. "
"A target gets its initial value for this property from the value "
"of the directory property. "
"A directory gets its initial value from its parent directory if "
"it has one. "
"Both directory and target property values are adjusted by calls "
"to the include_directories command."
"\n"
"The target property values are used by the generators to set "
"the include paths for the compiler. "
"See also the include_directories command.");
cm->DefineProperty
("LINK_DIRECTORIES", cmProperty::DIRECTORY,

View File

@ -485,6 +485,26 @@ void cmTarget::DefineProperties(cmake *cm)
"Installing a target with EXCLUDE_FROM_ALL set to true has "
"undefined behavior.");
cm->DefineProperty
("INCLUDE_DIRECTORIES", cmProperty::TARGET,
"List of preprocessor include file search directories.",
"This property specifies the list of directories given "
"so far to the include_directories command. "
"This property exists on directories and targets. "
"In addition to accepting values from the include_directories "
"command, values may be set directly on any directory or any "
"target using the set_property command. "
"A target gets its initial value for this property from the value "
"of the directory property. "
"A directory gets its initial value from its parent directory if "
"it has one. "
"Both directory and target property values are adjusted by calls "
"to the include_directories command."
"\n"
"The target property values are used by the generators to set "
"the include paths for the compiler. "
"See also the include_directories command.");
cm->DefineProperty
("INSTALL_NAME_DIR", cmProperty::TARGET,
"Mac OSX directory name for installed targets.",