Commit Graph

25054 Commits

Author SHA1 Message Date
Ben Boeckel a9c9b66c27 cmTarget: use a hash_map for cmTargets typedef 2014-07-17 11:17:52 -04:00
Ben Boeckel bcb6dbc1cb cmTarget: help the optimizer a bit 2014-07-17 11:17:52 -04:00
Ben Boeckel 679f3deeb7 cmTarget: use hash_set for sets of strings 2014-07-17 11:17:50 -04:00
Ben Boeckel 23d6520daa cmTarget: Allow caching of empty genex expansions 2014-07-17 11:17:50 -04:00
Ben Boeckel cd54f1dbeb cmTarget: Only copy GenEx expansions when necessary 2014-07-17 11:17:50 -04:00
Ben Boeckel b75fc0e1ad cmTarget: Don't set properties on custom targets
Properties are not required on custom targets.
2014-07-17 11:17:50 -04:00
Ben Boeckel 660769151a cmTarget: Use static strings for special property names
The function is called enough that the std::string/cstr comparisons are
expensive from the strlen. Cache the strings for faster comparisons.
2014-07-17 11:17:50 -04:00
Ben Boeckel cebefa71fa cmTarget: Sort special property checks
The LINK_LIBRARIES property is by *far* the most popular. Move it to the
top. TYPE is second, but with more generator expression usage, that may
change in the future.
2014-07-17 11:17:49 -04:00
Ben Boeckel 97ce676e75 cmTarget: Fast path for regular properties 2014-07-17 11:17:49 -04:00
Stephen Kelly 376ba93588 Help: Identify more artifact types in QtHelp documentation.
Add identifiers for variables, properties, policies and modules.
This will allow QtCreator to show relevant documentation if it learns
more about the context of the contents of cmake files.
2014-07-17 16:05:10 +02:00
Brad King ce7a5ca895 Merge branch 'backport-kwsys-qnx-fix' into release 2014-07-17 09:52:14 -04:00
Bob E cc3248f452 KWSys SystemInformation: No SA_RESTART on QNX
QNX not support SA_RESTART signal:

 /* #define SA_RESTART 0x0040 (not supported yet) */

Use it in SystemInformation only if it is defined.
2014-07-17 09:51:48 -04:00
Brad King 9d2bada3d4 Merge branch 'compile-with-cray' into release 2014-07-17 09:43:27 -04:00
Chuck Atkins fd63722dc8 cmcurl: Fix a build failure with the Cray compiler on Linux (#15026)
The error is caused by a workaround for UNICOS.  The workaround
incorrectly uses the _CRAYC macro to determine if building for
UNICOS.  This macro will always be defined for the Cray C and
C++ compiler regardless of the target platform, even when
building for Linux.  The correct macro should be _CRAY, which as
per Cray documentation is only defined for UNICOS targeted
builds.
2014-07-17 09:43:05 -04:00
Brad King e4510941a3 Merge topic 'refactor-link-internals'
c45dd669 cmTarget: Cache compatible interface property sets
89095514 cmTarget: Refactor GetLinkImplementationClosure internals
9d72df45 Genex: Adjust code layout slightly
d5f0743d Genex: Refactor empty element strip
60bafeb6 Genex: Avoid repeated search of transitive property whitelist
8cb91054 Genex: Simplify TARGET_PROPERTY transitive lookup
0a8fbac1 cmTarget: Drop GetTransitivePropertyTargets method
fb3518dc Refactor system include annotation propagation
535fd6ce cmTarget: Make GetLink*Libraries methods safer to use
2014-07-17 09:43:01 -04:00
Brad King bb4c158895 Merge topic 'generalize-LINK_ONLY'
10c5c82c Help: Add notes for topic 'generalize-LINK_ONLY'
6e7e881c Honor $<LINK_ONLY> when checking interface properties
0400cd5d Make $<LINK_ONLY> available to projects (#14751)
2014-07-17 09:43:00 -04:00
Brad King 96f2a2a2ed Merge topic 'compile-with-cray'
fd63722d cmcurl: Fix a build failure with the Cray compiler on Linux (#15026)
2014-07-17 09:42:57 -04:00
Brad King d8934eedaf Merge branch 'fix-QCC-compile-flags' into release 2014-07-17 09:41:40 -04:00
Stephen Kelly 3151024d24 QNX: Add missing flags for configurations and artifact creation.
Commit v3.0.0-rc1~111^2 (QNX: Introduce QCC compiler id for that
QNX platform compiler., 2014-01-20) split handling of the QNX QCC
compiler into a separate compiler-id.  That refactoring results in
the QCC compiler not using the CMake-compiler-id "GNU", which means
that the __compiler_gnu macro is no longer executed for it.

Add Compiler/QCC*.cmake modules to define and call the __compiler_qcc
macro and teach it to call __compiler_gnu internally.  Remove the
corresponding pieces from the Platform/QNX*.cmake modules.

It is also necessary to change the language conditional to dereference
the lang macro parameter, which is another bug introduced by the
same commit.  The extra -lang-c++ flag is only necessary when the CXX
compiler is specified as 'qcc' instead of 'QCC' in the toolchain file,
which is why this bug was not noticed before.  The flag is also necessary
in that case when linking in order to find the appropriate standard
libraries.  The flag was not previously added when linking executables,
so linking failed even with CMake 2.8.12 with the lower-case compiler-id.

Co-Author: Brad King <brad.king@kitware.com>
2014-07-17 09:36:18 -04:00
Brad King 3526478cc0 Tests: Activate tests accidentally excluded from Xcode
The generator name is "Xcode", not "XCode".  Fix this typo.  Explicitly
exclude the SubDirSpaces test on Xcode because it does not work.  Also
tell the RunCMake.File_Generate test when Xcode is not multi-config so
it can exlcude the OutputConflict case.

Inspired-by: Daniele E. Domenichelli <daniele.domenichelli@iit.it>
2014-07-17 09:31:53 -04:00
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