Checkout [1] as an example of the test failures. In that particular cases, the
failures is caused by the plus sign in the path being pass unescaped
(buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp.
In addition to failures in the log, the following new tests also fail in 2.8.11:
243 - CTestTestMemcheckUnknown (Failed)
244 - CTestTestMemcheckUnknownQuoted (Failed)
248 - CTestTestMemcheckDummyValgrindFailPre (Failed)
249 - CTestTestMemcheckDummyValgrindFailPost (Failed)
250 - CTestTestMemcheckDummyPurify (Failed)
251 - CTestTestMemcheckDummyBC (Failed)
253 - CMake.List (Failed)
[1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896
In commit 5b9149e0 (FindBoost: Overhaul caching and search repeat
behavior, 2012-09-24) we refactored the internal library search to use a
_Boost_FIND_LIBRARY macro to wrap around find_library calls. However,
CMake macros re-process escape sequences when evaluating calls inside
the macro after substituting placeholders (a historical bug). In order
to avoid escape sequences, convert backslashes to forward slashes before
passing arguments to the _Boost_FIND_LIBRARY macro.
This property should come from the content of the property itself,
plus the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*.
In contrast, when the INTERFACE_INCLUDE_DIRECTORIES is evaluated for
a target, the INTERFACE_INCLUDE_DIRECTORIES of the link *interface*
is used.
Similar logic applies for the COMPILE_DEFINITIONS target properties.
If the propertyName is already an INTERFACE_ variant of the property,
ie, the expression is similar to
$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>
then the INTERFACE_INCLUDE_DIRECTORIES of the link *interface* of foo
is used.
However, if the propertyName is not an INTERFACE_ variant, and the
interfacePropertyName is, ie, the expression is similar to:
$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>
then the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*
of foo is used.
This will be used to process transitive components of properties
which depend on linked targets. Currently only the link interface
of the target can be used as the source of the linked targets, but
in the next commit it will be possible to use the link implementation
as the source of link targets.
This commit does not change the semantics of the code.
Commit e65ef08b (try_compile: Fix quoting of libraries in generated
CMakeLists.txt, 2013-05-24) added quoting to entries specified in
the LINK_LIBRARIES. However, if the input entries contain whitespace
padding, that quoted whitespace causes an error in the generated
CMakeLists.txt at target_link_libraries.
Strictly, it is an error to have space separated entries in the
CMAKE_REQUIRED_LIBRARIES, as it was never properly handled by
CMakeExpandImportedTargets even prior to commit 236133e7 (Handle
targets in the LINK_LIBRARIES of try_compile., 2013-02-09). However,
it is causing a regression in KDE code which tests the next branch.
Allocate a buffer large enough to hold the input path when removing a
trailing slash. Use a local stack buffer when it is large enough and
fall back to heap allocation otherwise.
Since commit 236133e7 (Handle targets in the LINK_LIBRARIES of
try_compile, 2013-02-09) libraries passed to the new LINK_LIBRARIES
option of try_compile are not quoted inside the generated CMakeLists.txt
file. Quote the library names so they re-parse correctly when loaded by
CMake to configure and generate the test project.
Reported-by: Bogdan Cristea <cristeab@gmail.com>
The ExternalData_LINK_CONTENT option tells ExternalData to convert real
data files it finds into content links and to "stage" the original
content in a ".ExternalData_<algo>_<hash>" file. However, after a data
object has been staged it is possible that a user-provided pattern in
the "REGEX:" option will later match the staged object file. We must
not process staged object files even when a user pattern matches them.
Fix the implementation to not match a staged object file as a normal
data file for conversion. Extend the RunCMake.ExternalData test to
cover this case.
dea1df4 Memoize usage requirement include directories in a config-specific map
26dba6a Fix include dir propagation from conditionally linked targets
b8259c3 Centralize maintenance of usage requirement include directories
Commit 42ebb188 (Memoize includes and defines from interface libraries.,
2013-02-22) introduced caching of the includes. Fix the memoization to
be configuration-specific so that we do not accumulate entries across
multiple evaluations in a multi-config generator.
Generator expressions, including configuration-specific expressions may
be used as link libraries of targets. The old-style keywords of
target_link_libraries are handled in terms of new generator expressions.
However, the generator expressions expect target names to be valid
against a regular expression, whereas target_link_libraries does not
require validation. In generator expression constructed without any
action from the user we need to ensure that only valid expressions are
generated. Ensure that strings which are not valid target names are not
used in generator expressions which validate the argument.
Code like
target_link_libraries(B debug A)
generates usage requirement references such as "$<$<CONFIG:DEBUG>:A>".
When cmTarget::GetIncludeDirectories uses such references it generates
expressions like:
$<TARGET_PROPERTY:$<$<CONFIG:DEBUG>:A>,INTERFACE_INCLUDE_DIRECTORIES>
When the conditions are false such references evaluate as an empty
string and the expression fails with an error such as:
$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name.
Fix this by teaching cmTarget::GetIncludeDirectories to wrap the above
expression inside a conditional:
$<$<BOOL:$<$<CONFIG:DEBUG>:A>>:...>
so that $<TARGET_PROPERTY:...> will not be evaluated with an empty
target.
Maintain a target's internal list of usage requirement include
directories whenever the LINK_LIBRARIES property is set by either
target_link_libraries or set_property.
Re-word the documentation to make clear that CMake integrates usage
requirements during generation and not synchronously during
configuration or execution of target_link_libraries.