Add some newlines to generated files.

This might fix the error at

http://open.cdash.org/testDetails.php?test=167546009&build=2679466
Add workaround for broken std::remove on some Borland.

I don't have enough information about which versions of Borland
are affected, but if this workaround works, then it could be
put elsewhere such as cmsys.

http://qc.embarcadero.com/wc/qcmain.aspx?d=4957
http://www.gamedev.net/topic/366171-stdremove/
http://www.delphigroups.info/3/5/7456.html
http://bytes.com/topic/c/answers/59791-std-remove-syntax
http://forums.devx.com/showthread.php?94489-About-std-remove
Split the GeneratorExpression test into parts.

Some shells can't run the custom command as it is getting too long.
Merge topic 'tll-set-include-and-defines-requirements' into next

c955d93 Split the GeneratorExpression test into parts.
bf12a0b Add workaround for broken std::remove on some Borland.
4265ce4 Add some newlines to generated files.
Add expressions for separating build-location from install-location.

This is for specifying INCLUDE_DIRECTORIES relevant to the build-location
or the install location for example:

  set_property(TARGET foo PROPERTY
    INTERFACE_INCLUDE_DIRECTORIES
    "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>"
  )

A 'bar' target can then use:

  set_property(TARGET bar PROPERTY
    INCLUDE_DIRECTORIES
    "$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>"
  )

and it will work whether foo is in the same project, or an imported target
from an installation location, or an imported target from a build location
generated by the export() command.

Because the generator expressions are only evaluated at build-time, these
new expressions are equivalent to the ZeroNode and OneNode.

Additionally, the EXPORT_NAMESPACE expression is added to expand to the
namespace used when using export() or install(EXPORT). A full example of
this would be:

  set_property(TARGET bar PROPERTY
    INCLUDE_DIRECTORIES
    "$<TARGET_PROPERTY:$<EXPORT_NAMESPACE>foo,INTERFACE_INCLUDE_DIRECTORIES>"
  )

The GeneratorExpression test is split into parts. Some shells can't run
the custom command as it is getting too long.
Genex: Add INTERFACE_LINK_LIBRARIES property

This new property is a replacement for
the (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? properties as
it can contain generator expressions. It is also part of the generated
IMPORTED targets generated by the export() and install(EXPORT) commands.

User code may already populate
the (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? properties, so
policy CMP0019 is added to handle that.

If the policy is NEW, the old properties are ignored and
the INTERFACE_LINK_LIBRARIES property is used.

Otherwise if the policy is OLD the old properties are used and the
new INTERFACE_LINK_LIBRARIES is ignored.

The policy emits a warning if the old-style property and new-style
property differ in their content.

The policy also affects the IMPORTED targets generated by export()
and install(EXPORT). If the policy is NEW, that means that the user
has bumped their cmake requirement to 2.8.11. As we'll therefore be
generating INTERFACE_LINK_LIBRARIES properties in the IMPORTED
targets, we need to ensure that consumers can use the new property,
so 2.8.11 will be required for the consumers too.
Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions

The compiled generator expressions need to outlive the creating
type. For the same reason, store the input string in a std::string.
Keep track of INCLUDE_DIRECTORIES as a vector of structs.

The struct can keep track of where the include came from, which gives
us proper backtraces, and will allow us to implement a policy later
relating to order of include directories.
Handle INTERFACE properties transitively for includes and defines.

Contextually, the behavior is as if the properties content from another
target is included in the string and then the result is evaluated.
Add the TARGET_DEFINED generator expression

This tests whether the parameter is a usable target.
Add includes and compile definitions with target_link_libraries.

The compile-related properties are required for linking so it makes
sense to add the interface includes for dependencies.

This requires adding a policy to handle the change in behavior of
code such as:

 add_executable(foo ...)
 target_link_libraries(foo bar bat)
 include_directories(${bat_INCLUDE_DIRS} ${bar_INCLUDE_DIRS})

which will change order of generated includes after this patch if
bar or bat are TARGETS with an INTERFACE_INCLUDE_DIRECTORIES
property.

This includes a workaround for broken std::remove on some Borland
compilers.

I don't have enough information about which versions of Borland
are affected, but if this workaround works, then it could be
put elsewhere such as cmsys.

 http://qc.embarcadero.com/wc/qcmain.aspx?d=4957
 http://www.gamedev.net/topic/366171-stdremove/
 http://www.delphigroups.info/3/5/7456.html
 http://bytes.com/topic/c/answers/59791-std-remove-syntax
 http://forums.devx.com/showthread.php?94489-About-std-remove
Merge topic 'tll-set-include-and-defines-requirements' into next

ae6deb4 Add includes and compile definitions with target_link_libraries.
e3ebe1f Add the TARGET_DEFINED generator expression
a341626 Handle INTERFACE properties transitively for includes and defines.
0598445 Keep track of INCLUDE_DIRECTORIES as a vector of structs.
9c72d03 Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
16ea527 Genex: Add INTERFACE_LINK_LIBRARIES property
9737cec Add expressions for separating build-location from install-location.
Add cmTarget::GetDirectLinkDependencies.

This will be used at generate-time and can use generator expressions.
Generate the frameworks linked by a target lazily.

As this is only needed at generate-time, it can depend on the
config.
Make targets depend on the (config-specific) union of dependencies.

Future CMake features will allow linking to dependencies or not
depending on the config. However, generated buildsystems are not
capable of processing config-specific dependencies, so the targets
depend on the union of dependencies for all configs.
Merge topic 'link-libraries-generator-expression' into next

955d111 Make targets depend on the (config-specific) union of dependencies.
57627ca Generate the frameworks linked by a target lazily.
c8ac6fa Add cmTarget::GetDirectLinkDependencies.