Previously we kept direct link dependencies in OriginalLinkLibraries.
The property exposes the information in the CMake language through the
get/set_property commands. We preserve the OriginalLinkLibraries value
internally to support old APIs like that for CMP0003's OLD behavior, but
the property is now authoritative. This follows up from commit d5cf644a
(Split link information processing into two steps, 2012-11-01).
This will be used later to populate the link interface properties when
exporting targets, and will later allow use of generator expressions
when linking to libraries with target_link_libraries.
Also make targets depend on the (config-specific) union of dependencies.
CMake now allows linking to dependencies or not depending on the config.
However, generated build systems are not all capable of processing
config-specific dependencies, so the targets depend on the union of
dependencies for all configs.
Resolve this warning:
".../Tests/CMakeCommands/target_link_libraries/depB.cpp", line 8: warning:
variable "a" was declared but never referenced
DepA a;
^
The CMakeCommands.build_command test performs output/error checking
so move it over to RunCMake to re-use the generalized infrastrucure.
This is the only test left using Tests/CMakeCommands/CMakeLists.txt
so remove it.
Add a "CMakeCommands.find_package" test to run CMake on a bunch of cases
in which find_package fails. Check that the process return code and
warning/error messages are as expected. Record expected test output in
corresponding files for reference by the check. These files will also
serve as a reference for the message text in each case.