CMake Nightly Date Stamp
FPHSA: don't succeed if only checking for XX_FOUND (#13755)

This fixes issue #13755.
FPHSA(XX DEFAULT_MSG XX_FOUND)
always succeeded due to the way how the XX_FOUND variable was set.
It was preset to TRUE, and then reset to FALSE if something was missing
(...which had the effect that XX_FOUND itself was already preset when FPHSA
checked whether XX_FOUND is set)

Now XX_FOUND is unset first, and only later on set to TRUE.

Alex
Merge topic 'MinorFixFPHSA_13755' into next

4809cad FPHSA: don't succeed if only checking for XX_FOUND (#13755)
d5ac791 CMake Nightly Date Stamp
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
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.
Export: Generate both old and new-style LINK_INTERFACE prooperties.
Merge topic 'fix-add-INTERFACE_LINK_LIBRARIES-property' into next

f9deedc Export: Generate both old and new-style LINK_INTERFACE prooperties.
Merge topic 'link-libraries-generator-expression' into next

9e0921b Make targets depend on the (config-specific) union of dependencies.
5404c6f Generate the frameworks linked by a target lazily.
b4ab0c1 Add cmTarget::GetDirectLinkDependencies.
ed9f5b5 Add includes and compile definitions with target_link_libraries.
82f7780 Add the TARGET_DEFINED generator expression
c61ed6d Handle INTERFACE properties transitively for includes and defines.
7130be0 Keep track of INCLUDE_DIRECTORIES as a vector of structs.
e0575c4 Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
8f77e06 Genex: Add INTERFACE_LINK_LIBRARIES property
Add command to generate environment for a Windows CE SDK
Merge topic 'windows-ce-env-helper' into next

b558ecb Add command to generate environment for a Windows CE SDK
Try to avoid calling ExpandVariablesInString where not needed.

The target property INCLUDE_DIRECTORIES can contain generator
expressions, which contain '$' characters and make
the ExpandVariablesInString method execute slow code paths.

Practically, it is probably not necessary to call it anyway as the
expansion only remains for backward compatibility reasons, though
the specific reasons are not known.

This affects any CMake 2.8.10 code which makes (extensive?) use of
generator expressions in INCLUDE_DIRECTORIES target properties.
As that is a new feature in CMake 2.8.10, there are probably few
people affected by it. However, as the target_link_libraries command
in CMake 2.8.11 will populate the INCLUDE_DIRECTORIES property
with generator expressions, this makes the problem more apparent
everywhere.
Merge topic 'fix-ExpandVariables-performance' into next

5a9bca6 Try to avoid calling ExpandVariablesInString where not needed.
Workaround the failing build on SunPro.

My efforts to diagnose the problem via google and via email with the maintainer
of the machine have not borne fruit.