14198 Commits

Author SHA1 Message Date
Brad King
c479a06d80 CMake 2.8.11.1 2013-06-05 09:47:09 -04:00
Brad King
14779f87d2 Merge branch 'fix-genex-HEAD-target' into release 2013-06-05 09:44:52 -04:00
Brad King
c628fbc40d Merge branch 'xcode-framework-paths' into release 2013-06-05 09:44:42 -04:00
Brad King
4b9188825a Merge branch 'fix-include_directories-whitespace-handling' into release 2013-06-05 09:44:13 -04:00
Stephen Kelly
5b222354de Genex: Fix the HEAD target used for evaluated expressions
If the expression $<TARGET_PROPERTY:prop> appears in the content
of a target property, the target that prop is read from is
the 'head target' of the expression. In contexts such as evaluating
the content of a target property during generation, such
as INCLUDE_DIRECTORIES, the 'head target' is the one on which the
initial request was made.

If evaluating a generator expression which is not a target property
content, the target must be explicitly specified. Such contexts
include add_custom_command and file(GENERATE). The content might
then look like

 $<TARGET_PROPERTY:tgt,prop>

However, as there is no HeadTarget set, any generator expressions
evaluated as part of reading prop from tgt which do not specify
the tgt directly report an error.

Modify the logic of the TARGET_PROPERTY generator expression so
that in such contexts, the 'head target' is set to the appropriate
target which was first encountered.
2013-06-05 09:05:00 -04:00
Brad King
21a0beacc1 Xcode: Fix framework search paths in STATIC library targets (#14191)
In commit 2bc22bda (Xcode: Add frameworks search paths from link
dependeny closure, 2012-12-07) we made framework search paths from the
link closure conditional on target type, skipping it on STATIC and
OBJECT library targets that do not actually link.  However, the
framework search paths also influence the compile lines (-F options) so
we need them for all target types.  The Makefile generator already does
this, as did the Xcode generator prior to the above-mentioned commit.
2013-06-04 09:49:40 -04:00
Brad King
1ba508865e Merge branch 'fix-INCLUDE_DIRECTORIES-genex-read' into release 2013-05-31 09:37:27 -04:00
Brad King
8f26ed43b1 Merge branch 'fix-try_compile-library-spaces' into release 2013-05-31 09:37:20 -04:00
Brad King
aad04efe5e Merge branch 'fix-FileIsDirectory-SEGV' into release 2013-05-31 09:37:10 -04:00
Stephen Kelly
3aa9ce441f GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
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.
2013-05-30 15:43:42 +02:00
Stephen Kelly
0b39fefeac GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
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.
2013-05-30 15:43:42 +02:00
Stephen Kelly
53164ac997 cmTarget: Remove some hardcoding of transitive property names. 2013-05-30 15:43:37 +02:00
Stephen Kelly
e5375442ff try_compile: Trim whitespace from LINK_LIBRARIES entries
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.
2013-05-30 13:50:37 +02:00
Brad King
045d6ae0b0 KWSys: Fix SystemTools::FileIsDirectory with long paths (#14176)
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.
2013-05-28 11:27:05 -04:00
Stephen Kelly
b8cc6f4eba include_directories: Fix handling of empty or space-only entries
Since commit 0d46e9a0 (Store includes from the same include_directories
call together., 2013-01-20) we accidentally use such entries.  Fix the
code to drop them instead.  Update the IncludeDirectories test to cover
this case.

Reported-by: Christophe Giboudeaux <cgiboudeaux@gmx.com>
2013-05-24 16:40:58 -04:00
Brad King
e65ef08bf2 try_compile: Fix quoting of libraries in generated CMakeLists.txt
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>
2013-05-24 16:30:26 -04:00
Robert Maynard
0ad0c37206 CMake 2.8.11 2013-05-15 11:17:10 -04:00
Kitware Robot
5dd8c01429 CMake Nightly Date Stamp 2013-05-15 00:01:03 -04:00
Kitware Robot
26ad32031c CMake Nightly Date Stamp 2013-05-14 00:01:03 -04:00
Kitware Robot
a3f106dedf CMake Nightly Date Stamp 2013-05-13 00:01:02 -04:00
Kitware Robot
90dad912f8 CMake Nightly Date Stamp 2013-05-12 00:01:03 -04:00
Kitware Robot
1c575ab72f CMake Nightly Date Stamp 2013-05-11 00:01:06 -04:00
Kitware Robot
a3e7c94fd7 CMake Nightly Date Stamp 2013-05-10 00:01:03 -04:00
Kitware Robot
cf4869ba08 CMake Nightly Date Stamp 2013-05-09 00:01:03 -04:00
Kitware Robot
619fa2cce8 CMake Nightly Date Stamp 2013-05-08 00:01:03 -04:00
Robert Maynard
6162e0ff2d CMake 2.8.11-rc4 2013-05-07 11:56:31 -04:00
Robert Maynard
b882ef7565 Merge branch 'release' 2013-05-07 11:33:14 -04:00
Kitware Robot
ff298fff79 CMake Nightly Date Stamp 2013-05-07 00:01:03 -04:00
Brad King
6c6bfe1509 Merge topic 'doc-tll-usage-requirements'
2618e02 target_link_libraries: Update usage requirements documentation
2013-05-06 10:09:44 -04:00
Brad King
0483bf8062 Merge topic 'fix-per-config-tll-include-dirs'
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
2013-05-06 10:09:28 -04:00
Stephen Kelly
dea1df4e5e Memoize usage requirement include directories in a config-specific map
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.
2013-05-06 09:59:28 -04:00
Stephen Kelly
26dba6a162 Fix include dir propagation from conditionally linked targets
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.
2013-05-06 09:55:45 -04:00
Stephen Kelly
b8259c3d69 Centralize maintenance of usage requirement include directories
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.
2013-05-06 09:54:11 -04:00
Kitware Robot
b85f691d78 CMake Nightly Date Stamp 2013-05-06 00:01:03 -04:00
Kitware Robot
4cb77c4a0e CMake Nightly Date Stamp 2013-05-05 00:01:02 -04:00
Kitware Robot
21bdeadf00 CMake Nightly Date Stamp 2013-05-04 00:01:02 -04:00
Kitware Robot
41839d6fb6 CMake Nightly Date Stamp 2013-05-03 00:01:03 -04:00
Kitware Robot
d94eae4356 CMake Nightly Date Stamp 2013-05-02 00:01:02 -04:00
Kitware Robot
e9e088a4df CMake Nightly Date Stamp 2013-05-01 00:01:08 -04:00
Brad King
2618e0257e target_link_libraries: Update usage requirements documentation
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.
2013-04-30 09:15:03 -04:00
Kitware Robot
2ba65cc9d9 CMake Nightly Date Stamp 2013-04-30 00:01:05 -04:00
Kitware Robot
c80594ba12 CMake Nightly Date Stamp 2013-04-29 00:01:13 -04:00
Kitware Robot
77df4ef5ac CMake Nightly Date Stamp 2013-04-28 00:01:03 -04:00
Kitware Robot
82f5936a8b CMake Nightly Date Stamp 2013-04-27 00:01:11 -04:00
Kitware Robot
c8b34729d9 CMake Nightly Date Stamp 2013-04-26 00:01:09 -04:00
Kitware Robot
78185f598c CMake Nightly Date Stamp 2013-04-25 00:01:03 -04:00
Kitware Robot
90bd164193 CMake Nightly Date Stamp 2013-04-24 00:01:07 -04:00
Kitware Robot
2baf851c34 CMake Nightly Date Stamp 2013-04-23 00:01:07 -04:00
Kitware Robot
e55b8ce4a4 CMake Nightly Date Stamp 2013-04-22 00:01:04 -04:00
Kitware Robot
d37fe5bc5b CMake Nightly Date Stamp 2013-04-21 00:01:05 -04:00