Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Pfeifer 7a649111cd Use string(APPEND) in Tests
Automate with:

find Tests -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:43:04 +02:00
Mariusz Pluciński 123b7e1335 Tests: fix AliasTarget building on Clang/C2 2016-03-10 09:11:41 -05:00
Stephen Kelly 4ce9742ae3 Alias: Fix access at generate-time (#15832)
Commit c389f8bb (cmLocalGenerator: Port Find method away from
GetGeneratorTarget, 2015-10-25) ported the implementation of
FindGeneratorTargetToUse away from the FindTargetToUse method,
but neglected to handle alias targets.

The latter method has a parameter to determine whether to
include alias targets in the search, but as that is only
needed at configure time, this generate-time equivalent does
not need the condition.
2015-11-08 13:54:49 +01:00
Rolf Eike Beer b0f277db38 HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
Old versions of aCC need a special compiler flag to get full C++98 template
support as e.g. CMake itself or the Complex and ComplexOneConfig tests need.
The same versions need a special flag to get a proper C++ library, too.
2014-04-25 17:59:57 +02:00
Stephen Kelly cd3d0b613e get_property: Fix testing ALIASED_TARGET target property (#14670)
In the case where the argument is not an ALIAS, the variable should
be set to a -NOTFOUND content.
2014-01-04 11:28:57 +01:00
Stephen Kelly fe732264e9 Add the INTERFACE_LIBRARY target type.
This target type only contains INTERFACE_* properties, so it can be
used as a structural node. The target-specific commands enforce
that they may only be used with the INTERFACE keyword when used
with INTERFACE_LIBRARY targets. The old-style target properties
matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for
this target type.

The name of the INTERFACE_LIBRARY must match a validity generator
expression. The validity is similar to that of an ALIAS target,
but with the additional restriction that it may not contain
double colons. Double colons will carry the meaning of IMPORTED
or ALIAS targets in CMake 2.8.13.

An ALIAS target may be created for an INTERFACE library.

At this point it can not be exported and does not appear in the
buildsystem and project files are not created for them. That may
be added as a feature in a later commit.

The generators need some changes to handle the INTERFACE_LIBRARY
targets returned by cmComputeLinkInterface::GetItems. The Ninja
generator does not use that API, so it doesn't require changes
related to that.
2013-10-07 19:56:31 -04:00
Stephen Kelly 370bf55415 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.
2013-08-02 15:21:00 +02:00