Add the ALIAS target concept for libraries and executables.

* The ALIAS name must match a validity regex.
* Executables and libraries may be aliased.
* An ALIAS acts immutable. It can not be used as the lhs
  of target_link_libraries or other commands.
* An ALIAS can be used with add_custom_command, add_custom_target,
  and add_test in the same way regular targets can.
* The target of an ALIAS can be retrieved with the ALIASED_TARGET
  target property.
* An ALIAS does not appear in the generated buildsystem. It
  is kept separate from cmMakefile::Targets for that reason.
* A target may have multiple aliases.
* An ALIAS target may not itself have an alias.
* An IMPORTED target may not have an alias.
* An ALIAS may not be exported or imported.
This commit is contained in:
Stephen Kelly
2013-07-12 09:14:31 +02:00
parent b341bf2178
commit 370bf55415
89 changed files with 740 additions and 19 deletions

View File

@@ -107,6 +107,19 @@ public:
"(and its per-configuration version IMPORTED_LOCATION_<CONFIG>) "
"which specifies the location of the main executable file on disk. "
"See documentation of the IMPORTED_* properties for more information."
"\n"
"The signature\n"
" add_executable(<name> ALIAS <target>)\n"
"creates an alias, such that <name> can be used to refer to <target> "
"in subsequent commands. The <name> does not appear in the generated "
"buildsystem as a make target. The <target> may not be an IMPORTED "
"target or an ALIAS. Alias targets can be used as linkable targets, "
"targets to read properties from, executables for custom commands and "
"custom targets. They can also be tested for existance with the "
"regular if(TARGET) subcommand. The <name> may not be used to modify "
"properties of <target>, that is, it may not be used as the operand of "
"set_property, set_target_properties, target_link_libraries etc. An "
"ALIAS target may not be installed of exported."
;
}