Commit Graph

25134 Commits

Author SHA1 Message Date
Kitware Robot e411b30842 CMake Nightly Date Stamp 2014-07-17 00:01:11 -04:00
Ben Boeckel 4cfa918a9a cmTarget: Factor out common code 2014-07-16 17:28:32 -04:00
Ben Boeckel 85242b7df6 cmTarget: Use else/if trees rather than an if tree
Skips lots of unnecessary string comparisons.
2014-07-16 17:28:32 -04:00
Brad King 10c5c82c1e Help: Add notes for topic 'generalize-LINK_ONLY' 2014-07-16 14:26:18 -04:00
Brad King c45dd669ab cmTarget: Cache compatible interface property sets
Replace isLinkDependentProperty with a CompatibleInterfaces structure
that records all the compatible interface properties in a set for each
type.  This avoids repeatedly traversing the link implementation closure
and asking every target for its compatible interface properties.
2014-07-16 13:38:22 -04:00
Brad King 89095514a7 cmTarget: Refactor GetLinkImplementationClosure internals
Store the 'Done' flag directly in each map entry instead of using a
separate map.
2014-07-16 13:38:22 -04:00
Brad King 9d72df4505 Genex: Adjust code layout slightly 2014-07-16 13:31:30 -04:00
Brad King d5f0743d0f Genex: Refactor empty element strip
In cmGeneratorExpressionEvaluator, teach getLinkedTargetsContent to call
cmGeneratorExpression::StripEmptyListElements to transform its return
value so that callers do not have to do so.
2014-07-16 13:31:30 -04:00
Brad King 60bafeb684 Genex: Avoid repeated search of transitive property whitelist
In cmGeneratorExpressionEvaluator, avoid searching through the list of
transitive interface property names repeatedly during evaluation of
TargetPropertyNode.  Simply record the results of the first search for
later re-use.
2014-07-16 13:31:30 -04:00
Brad King 8cb9105431 Genex: Simplify TARGET_PROPERTY transitive lookup
In cmGeneratorExpressionEvaluator, make getLinkedTargetsContent a
template so it can traverse over either the Libraries in a cmTarget
LinkImplementationLibraries or a cmTarget LinkInterfaceLibraries.  This
also avoids creating a separate vector<cmTarget*>.
2014-07-16 13:31:30 -04:00
Brad King 0a8fbac19a cmTarget: Drop GetTransitivePropertyTargets method
Inline the implementation at the only remaining call site.
2014-07-16 13:31:29 -04:00
Brad King fb3518dc81 Refactor system include annotation propagation
Since commit v3.0.0-rc1~174^2~1 (cmTarget: Fix system include annotation
propagation, 2014-01-01) the cmGeneratorTarget::IsSystemIncludeDirectory
method needs to collect all targets that might provide
INTERFACE_(|SYSTEM)_INCLUDE_DIRECTORIES for the current target.  We now
have cmTarget::GetLinkImplementationClosure to provide this, so use it.
2014-07-16 13:31:29 -04:00
Brad King 535fd6ce6d cmTarget: Make GetLink*Libraries methods safer to use
Split the library lists out of LinkImplementation and LinkInterface into
LinkImplementationLibraries and LinkInterfaceLibraries parent classes,
respectively.  Return these from GetLinkImplementationLibraries and
GetLinkInterfaceLibraries, respectively, so that callers cannot access
parts of the structures that have not been populated.
2014-07-16 13:31:29 -04:00
Brad King 6e7e881c57 Honor $<LINK_ONLY> when checking interface properties
Callers of cmTarget::GetLinkImplementationClosure are interested in the
set of targets whose interface properties propagate to the current
target.  This excludes targets guarded by $<LINK_ONLY>.

Teach the CompatibleInterface test to cover suppression of interface
compatibility tests with $<LINK_ONLY>.  Although this is not recommended
in practice, it is a way of covering the above behavior.
2014-07-16 13:28:47 -04:00
Brad King 0400cd5dd1 Make $<LINK_ONLY> available to projects (#14751)
Previously this generator expression was used internally by the
target_link_libraries command to honor private linking requirements of
static libraries in their INTERFACE_LINK_LIBRARIES.  Remove the check
that limits $<LINK_ONLY> to this use case to make it available for
project code to use too.
2014-07-16 13:28:44 -04:00
Brad King a0dc1354fe Merge topic 'refactor-link-internals'
1ca0c0e9 cmTarget: Refactor internal imported LinkInterface map
102eea60 cmTarget: Simplify internal ComputeLinkInterfaceLibraries method
b0f57408 cmTarget: Move ComputeLinkInterfaceLibraries to internals
c69e8a55 cmTarget: Refactor internal LinkInterface map
4db3990e cmTarget: Drop 'head' argument from processSources
4b8130b8 cmTarget: Drop 'head' argument from GetSourceFiles
4c763dd1 cmTarget: Drop 'head' argument from GetLanguages
190cabe7 cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguages
2014-07-16 13:04:21 -04:00
Brad King 66e88af6d0 Merge topic 'thread-sanitizer'
1e005ead CTest: Fix MemoryCheckType from 'ctest -T MemCheck'
44726714 ctest_memcheck: Add support for memory and leak sanitizer.
2014-07-16 11:51:21 -04:00
Bill Hoffman 1e005eadbc CTest: Fix MemoryCheckType from 'ctest -T MemCheck'
Before this commit, you would have to run ctest -S mode to get
MemoryCheckType to work. This is because CMAKE_COMMAND was not set.
The fix is to use cmSystemTools::GetCMakeCommand instead.
2014-07-16 11:50:33 -04:00
Bill Hoffman 4472671432 ctest_memcheck: Add support for memory and leak sanitizer.
This adds support for memory and leak sanitizers.  This is built into
clang and gcc 4.8 and new compilers. It is activated with a -f switch
during compile.
2014-07-16 11:50:23 -04:00
Kitware Robot 3dce6aa39d CMake Nightly Date Stamp 2014-07-16 00:01:13 -04:00
Brad King 49bf3e7d8d Merge topic 'target-legacy-depends-only-for-vs6'
8a205b98 cmTarget: Compile old-style link dependencies only for VS 6
d57be904 cmTarget: Run old-style link dependencies only for VS 6
b3b44d13 cmTarget: Rename old-style link dependencies code as "ForVS6"
80cb12bb export_library_dependencies: Use original link libraries internally
2014-07-15 10:48:22 -04:00
Brad King 41fc00820a Merge topic 'FindCurses-overhaul'
6c8364e6 FindCurses: Overhaul Curses and NCurses search logic (#15011)
2014-07-15 10:48:20 -04:00
Brad King c005d95662 Merge topic 'dev/ison-isoff-performance'
43a8c552 SystemTools: Use a set in Is{On,Off}
9270aa9a IsOff: Use the length for the string construction
2014-07-15 10:48:18 -04:00
Brad King 29abb3dedb Merge topic 'dev/fix-cmake-rule-property'
4b139169 cmMakefile: fix __CMAKE_RULE property setting
2014-07-15 10:48:17 -04:00
Brad King d3076b1d51 Merge topic 'FindImageMagick-pkgconfig'
90245fe8 FindImageMagick: Use pkgconfig hints if available (#14012)
2014-07-15 10:48:15 -04:00
Brad King 0bbebd3ca1 Merge topic 'doc-package-target-import-once'
0fee3f47 Revert "Help: Update cmake-packages.7 examples to import targets only once"
2014-07-15 10:48:13 -04:00
Brad King 0fee3f4712 Revert "Help: Update cmake-packages.7 examples to import targets only once"
This reverts commit cfab942e5f.
Since commit v2.8.11~362^2 (Generate an early-return guard in target
Export files, 2012-11-30) an external include guard is not needed.
2014-07-15 08:59:11 -04:00
Kitware Robot 7bc8450251 CMake Nightly Date Stamp 2014-07-15 00:01:07 -04:00
Brad King 2cb8eed6e3 Merge branch 'release' 2014-07-14 15:19:16 -04:00
Rex Dieter 90245fe86e FindImageMagick: Use pkgconfig hints if available (#14012)
Tested-by: bastien ROUCARIES <roucaries.bastien@gmail.com>
2014-07-14 15:05:28 -04:00
Brad King 8a205b980c cmTarget: Compile old-style link dependencies only for VS 6
Compile all the "ForVS6" cmTarget members only on Windows.  No other
platforms support the VS 6 generator.
2014-07-14 14:39:20 -04:00
Brad King d57be904ae cmTarget: Run old-style link dependencies only for VS 6
Invoke it at runtime only with the VS 6 generator.  No other generators
need it.
2014-07-14 14:38:58 -04:00
Brad King b3b44d138e cmTarget: Rename old-style link dependencies code as "ForVS6"
The old link dependency analysis is now needed only for the VS 6
generator code delimited by CM_USE_OLD_VS6 to support project-provided
project templates.  Rename the related cmTarget members to be "ForVS6".
2014-07-14 14:37:04 -04:00
Brad King 80cb12bb8b export_library_dependencies: Use original link libraries internally
This command was using the cmTarget::GetLinkLibraries method with a
comment explaining how execution order gives it the dependencies before
analysis.  Just use cmTarget::GetOriginalLinkLibraries instead.
2014-07-14 14:29:26 -04:00
Ben Boeckel 4b13916970 cmMakefile: fix __CMAKE_RULE property setting
It got put into the condition by mistake.
2014-07-14 12:55:04 -04:00
Brad King 6c8364e6cb FindCurses: Overhaul Curses and NCurses search logic (#15011)
Produce a more consistent result by finding only a single include
directory and reporting which headers may be included from it.  The
previous search for each header separately might find pieces from
separate and incompatible packages.

While at it, provide the CURSES_INCLUDE_DIRS result variable to be
consistent with other modules.
2014-07-14 11:23:02 -04:00
Brad King 1ca0c0e94a cmTarget: Refactor internal imported LinkInterface map
Create the map entry up front and store in it a boolean value indicating
whether the LinkInterface structure has been populated.  This approach
leads to shorter code that is easier to follow too.
2014-07-14 10:21:46 -04:00
Brad King 102eea60cd cmTarget: Simplify internal ComputeLinkInterfaceLibraries method
Now that the method can see the full OptionalLinkInterface structure,
store information there instead of passing it through arguments.
2014-07-14 10:00:51 -04:00
Brad King b0f5740851 cmTarget: Move ComputeLinkInterfaceLibraries to internals
There are no external callers, and this will allow the method to see
the full OptionalLinkInterface internal structure.
2014-07-14 09:55:52 -04:00
Brad King c69e8a5580 cmTarget: Refactor internal LinkInterface map
Create the map entry up front and store in it boolean values indicating
which pieces of the LinkInterface structure have been populated.
This approach leads to shorter code that is easier to follow too.
2014-07-14 09:51:51 -04:00
Brad King 4db3990e9f cmTarget: Drop 'head' argument from processSources
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 4b8130b8de cmTarget: Drop 'head' argument from GetSourceFiles
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 4c763dd1f1 cmTarget: Drop 'head' argument from GetLanguages
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 190cabe7c1 cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguages
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King c72642f927 Merge topic 'FindCurses-blank-at-eof'
ccf2fca1 FindCurses: Remove blank line at end of file
2014-07-14 09:42:40 -04:00
Brad King 9124ec1c94 Merge topic 'doc-genex-id-values'
5690a963 Help: Link to variables corresponding to id and version expressions (#15012)
2014-07-14 09:38:02 -04:00
Brad King 5ba3cbbd24 Merge topic 'refactor-link-internals'
f45ede61 cmTarget: Fix CMP0022 OLD breakage from recent refactoring
2014-07-14 09:38:00 -04:00
Brad King f1b33fccd1 Merge topic 'vs-RC-flags'
5d873846 VS: Fix handling of non-preprocessor flags in CMAKE_RC_FLAGS
2014-07-14 09:37:59 -04:00
Brad King 23eb0aaef5 Merge topic 'wince-fix-dll-linking'
7e1283e4 MSVC: Fix linking of DLLs on WinCE (#15013)
2014-07-14 09:37:57 -04:00
Brad King 5fc50479bf Merge topic 'install-cfbundle-directory'
a3ac67cc OS X: Install CFBundles as complete directories
2014-07-14 09:37:54 -04:00