Commit Graph

24678 Commits

Author SHA1 Message Date
Brad King 1f36b03504 Merge branch 'release' 2014-06-25 13:46:13 -04:00
Brad King cbf0107977 Merge topic 'refactor-link-internals'
f5c18c9c cmTarget: Drop GetDirectLinkLibraries methods
281eb3d8 cmTarget: Improve HaveBuildTreeRPATH implementation
d912220e cmTarget: Lookup targets in LinkInterface and LinkImplementation
edce4351 cmExportFileGenerator: Make SetImportLinkProperty a template
097be413 cmTarget: Add GetUtilityItems to get target ordering dependencies
4dad5fd2 cmTarget: Add cmLinkItem to refer to a target by name and pointer
a2723442 Fix scope of transitive target name lookups
069d60fe cmTarget: Add method to lookup other targets in a target's scope
47ab3ca6 cmTarget: Constify GetLinkImplementationClosure results
9f3ed029 cmTarget: Constify GetTransitivePropertyTargets results
6f0951af cmTarget: Drop 'head' target from GetImportInfo
0dc9e88d cmTarget: Remove 'head' argument from GetLinkImplementation
4ac72455 cmTarget: Drop 'head' argument from GetLinkClosure
bcdb7ff9 cmTarget: Remove 'head' argument from GetLinkerLanguage
bd9b667b cmComputeLinkInformation: Remove 'head' argument
06328dd5 cmTarget: Remove 'head' argument from GetLinkInformation
...
2014-06-25 13:11:50 -04:00
Brad King 4c27c51f25 Merge topic 'launcher-limit-warnings-errors'
f7303131 CTest: Teach the launchers to honer the max warnings and errors
2014-06-25 10:53:09 -04:00
Bill Hoffman f730313143 CTest: Teach the launchers to honer the max warnings and errors
The ctest launcher code did not respect the number of errors and
warnings limits.  Limit the number of launcher report fragments that we
report in the final submission.
2014-06-25 10:53:34 -04:00
Brad King 1b40fc835e Merge topic 'style-fix'
3c5eac1f cmCTestMemCheckHandler: Fix coding style in this class
2014-06-25 10:53:07 -04:00
Brad King a51efd1e6d Merge topic 'update-cdash-location'
57ddde52 Update CDash server URL
1bd4e006 Tests: Fix CMAKE_TESTS_CDASH_SERVER parsing
2014-06-25 10:53:05 -04:00
Brad King bb2b374dc1 Merge topic 'find-module-targets'
1d8de85d Help: Add notes for topic 'find-module-targets'
144b255b FindGLUT.cmake: Add imported targets and documentation
c90c7fca FindX11: fix documentation formatting error
3d82a223 FindGLEW: Add imported target and documentation
5a7ff421 FindZLIB: Add imported target and documentation
2014-06-25 10:53:03 -04:00
Bill Hoffman 3c5eac1fbb cmCTestMemCheckHandler: Fix coding style in this class
This class had a method that started with lower case, and also
was called without this->.
2014-06-25 10:51:45 -04:00
Brad King 1d8de85d4e Help: Add notes for topic 'find-module-targets' 2014-06-25 10:50:11 -04:00
Kitware Robot 6c383f89a1 CMake Nightly Date Stamp 2014-06-25 00:01:10 -04:00
Philipp Moeller 144b255b08 FindGLUT.cmake: Add imported targets and documentation
Also let find_library really search for frameworks on OS X.
2014-06-24 14:08:02 -04:00
Brad King 57ddde524b Update CDash server URL
It is now at open.cdash.org and does not start in "/CDash".
2014-06-24 13:54:52 -04:00
Brad King 1bd4e006aa Tests: Fix CMAKE_TESTS_CDASH_SERVER parsing
Allow the value to end without a slash and have an empty server path
component.  This is needed to match "http://open.cdash.org" correctly.
2014-06-24 13:54:51 -04:00
Brad King c196b3ca02 Merge topic 'gfortran-compressed-modules'
d90be200 Fortran: Add support for GNU >= 4.9 compressed modules (#14975)
2014-06-24 13:05:10 -04:00
Brad King 24853afa87 Merge topic 'stringapi-crash-cleanup'
c491cb1e Fix some generator crashes on undefined CMAKE_BUILD_TYPE
2014-06-24 13:05:08 -04:00
Brad King 8766f8ef47 Merge topic 'cmake-E-env'
7abd5747 cmake: Add '-E env' command-line tool
2014-06-24 13:05:05 -04:00
Philipp Möller c90c7fca6e FindX11: fix documentation formatting error
While at it, remove excess indentation.
2014-06-24 08:24:33 -04:00
Kitware Robot f9cfbedef6 CMake Nightly Date Stamp 2014-06-24 00:01:10 -04:00
Brad King 7abd574798 cmake: Add '-E env' command-line tool
Extend the cmake command-line interface to support

 cmake -E env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...

This will be useful to run processes with modified environments
without using a shell or a full "cmake -P" script to wrap it.

Extend the RunCMake.CommandLine test to cover success and failure cases.

Inspired-by: Jonathan Bohren <jbo@jhu.edu>
2014-06-23 16:47:49 -04:00
Philipp Möller 3d82a2234a FindGLEW: Add imported target and documentation 2014-06-23 11:09:29 -04:00
Philipp Möller 5a7ff42100 FindZLIB: Add imported target and documentation 2014-06-23 11:09:25 -04:00
Brad King 0474aa4a78 Merge topic 'FindOpenCL-fix-ENV'
d4295539 FindOpenCL: Added missing ENV for each environment variable reference
2014-06-23 10:27:58 -04:00
Brad King fc6fdc9b0b Merge topic 'qthelp-context-fixes'
d107949d Help: Add context to titles in QtHelp.
b5002631 Help: Create proper identifiers for keywords in QtHelp.
2014-06-23 10:27:56 -04:00
Brad King 56c9428c88 Merge topic 'encoding-parse-commandline'
b6b493a4 Encoding: Fix debug asserts parsing command line options with non-ascii chars.
9dc88ee9 Merge topic 'fix-valgrind-in-path'
2014-06-23 10:27:54 -04:00
Brad King ca0cd31a0f Merge topic 'InstallRequiredSystemLibraries-repeat'
15a19c31 InstallRequiredSystemLibraries: Allow repeat use per-config
2014-06-23 10:27:52 -04:00
Matthäus G. Chajdas d429553976 FindOpenCL: Added missing ENV for each environment variable reference
Also add an 'include' path suffix that may appear after the value of
some of the environment variables.
2014-06-23 10:26:52 -04:00
Brad King 3ec3b8a926 Merge branch 'gfortran-compressed-modules' into release 2014-06-23 10:01:40 -04:00
Brad King d90be200ec Fortran: Add support for GNU >= 4.9 compressed modules (#14975)
From the GCC 4.9 release notes for Fortran:

 https://gcc.gnu.org/gcc-4.9/changes.html
 "Module files: The version of the module files (.mod) has been
  incremented; additionally, module files are now compressed."

Teach cmDependsFortran::ModulesDiffer to look for the gzip magic numbers
at the beginning of the module file.  If found, assume the module was
produced by gfortran >= 4.9.  The modules do not appear to contain the
date as earlier versions did so we can compare the content directly
and do not actually need to decompress.
2014-06-23 10:00:27 -04:00
Brad King c491cb1eb4 Fix some generator crashes on undefined CMAKE_BUILD_TYPE
Since commit 84fdc9921 (stringapi: Pass configuration names as strings,
2014-02-09), it is not safe to use GetDefinition("CMAKE_BUILD_TYPE")
without checking the return value.  Use GetSafeDefinition instead so
that a missing definition is treated as an empty string like code paths
did prior to the above commit.

Reported-by: Richard Wirth <richard@califax.de>
2014-06-23 09:43:46 -04:00
Brad King f5c18c9c1c cmTarget: Drop GetDirectLinkLibraries methods
Inline the implementation in the last remaining caller and drop the
methods.
2014-06-23 09:22:08 -04:00
Brad King 281eb3d8a6 cmTarget: Improve HaveBuildTreeRPATH implementation
Use GetLinkImplementationLibraries instead of GetDirectLinkLibraries
because it tells us whether there will be any libraries to link after
evaluating generator expressions.  Also GetDirectLinkLibraries will be
dropped soon.
2014-06-23 09:22:08 -04:00
Brad King d912220eaa cmTarget: Lookup targets in LinkInterface and LinkImplementation
Instead of storing just the string names in these structures, lookup any
target associated with each item and store its cmTarget pointer.  Use
the cmLinkItem class to hold the name and pointer together.  Update
client sites to use the pre-stored lookup result instead of looking up
the target name again.

Create a cmTarget::LookupLinkItems helper method to handle the lookup.
Since lookups are now moving from cmComputeLinkDepends::AddLinkEntries
to cmTarget::LookupLinkItems, move use of CheckCMP0004 to the latter.
This drops use of CheckCMP0004 from entries added for _LIB_DEPENDS
variables by cmComputeLinkDepends::AddVarLinkEntries, but I do not
think that use was intentional originally anyway.
2014-06-23 09:22:07 -04:00
Brad King edce43514d cmExportFileGenerator: Make SetImportLinkProperty a template
Allow the vector of property entries to have any element type
that can convert to std::string.
2014-06-23 09:22:07 -04:00
Brad King 097be4139d cmTarget: Add GetUtilityItems to get target ordering dependencies
Add a method like GetUtilities but that provides the target names
already looked up and resolved to cmTarget pointers internally.  Update
call site in cmComputeTargetDepends::AddTargetDepend to use the
already-found target instead of looking it up again.
2014-06-23 09:21:56 -04:00
Brad King 4dad5fd20b cmTarget: Add cmLinkItem to refer to a target by name and pointer
Many items named in target_link_libraries calls are targets, but not
all.  Create a cmLinkItem type that acts like std::string so it can name
an item but also has a pointer to a cmTarget that is the result of
looking up the item name in the referencing target's scope.  This will
be useful to avoid duplicate lookup operations later.
2014-06-23 09:17:07 -04:00
Brad King a272344228 Fix scope of transitive target name lookups
In cmTarget, cmGeneratorTarget, and cmGeneratorExpressionEvaluator, fix
target name lookups to occur in the cmMakefile context of the target
that referenced the name, not the current 'head' target.  The context
matters for imported targets because they are directory-scoped instead
of globally unique.  We already do this in cmComputeLinkDepends and
cmComputeTargetDepends.

Extend the InterfaceLibrary test with an example covering this behavior.
2014-06-23 09:17:07 -04:00
Brad King 069d60fe03 cmTarget: Add method to lookup other targets in a target's scope
Move the main implementation of cmComputeLinkDepends::FindTargetToLink
into cmTarget.
2014-06-23 09:17:06 -04:00
Brad King 47ab3ca641 cmTarget: Constify GetLinkImplementationClosure results
Populate a vector of "cmTarget const*" instead of "cmTarget*".
2014-06-23 09:17:06 -04:00
Brad King 9f3ed029ce cmTarget: Constify GetTransitivePropertyTargets results
Populate a vector of "cmTarget const*" instead of "cmTarget*".
2014-06-23 09:17:06 -04:00
Brad King 6f0951af01 cmTarget: Drop 'head' target from GetImportInfo
Move generator expression evaluation for imported library lists out of
GetImportInfo and into a new GetImportLinkInterface helper.  This avoids
duplicating the computation and storage of all imported target info just
because some of it is parameterized on the 'head' target.
2014-06-23 09:17:06 -04:00
Brad King 0dc9e88d76 cmTarget: Remove 'head' argument from GetLinkImplementation
Many of the 'head' arguments added by commit v2.8.11~289^2~1 (Make
linking APIs aware of 'head' target, 2013-01-04) turned out not to be
needed.  The "link implementation" of a target never needs to be
computed with anything but itself as the 'head' target (except for
CMP0022 OLD behavior because then it is the link interface).

Remove the unused 'head' target paths.  Add "internal" versions of
cmTarget::GetDirectLinkLibraries and GetLinkImplementationLibraries
to support the CMP0022 OLD behavior without otherwise exposing the
'head' target option of these methods.
2014-06-23 09:17:00 -04:00
Brad King 4ac72455fd cmTarget: Drop 'head' argument from GetLinkClosure
It is only ever passed the 'this' target itself.
2014-06-23 09:14:45 -04:00
Brad King bcdb7ff9df cmTarget: Remove 'head' argument from GetLinkerLanguage
It is only ever called with the 'this' target as the head.

Co-Author: Stephen Kelly <steveire@gmail.com>
2014-06-23 09:14:45 -04:00
Brad King bd9b667bbe cmComputeLinkInformation: Remove 'head' argument
It is only ever constructed with the current target as its own 'head'.

Co-Author: Stephen Kelly <steveire@gmail.com>
2014-06-23 09:14:45 -04:00
Brad King 06328dd58e cmTarget: Remove 'head' argument from GetLinkInformation
No call sites use it anyway.

Co-Author: Stephen Kelly <steveire@gmail.com>
2014-06-23 09:14:45 -04:00
Brad King 56aed7005a cmTarget: Cache GetLinkImplementationClosure results
Store them internally and return by reference to avoid duplicate
computation.
2014-06-23 09:14:44 -04:00
Brad King cbf689c7dd cmTarget: Rename Get{TransitiveTarget => LinkImplementation}Closure
The method computes the transitive closure of targets starting with
the current target link implementation libraries.  Clarify the name.
2014-06-23 09:14:44 -04:00
Brad King 2f0004c143 cmTarget: Remove 'head' argument from GetTransitiveTargetClosure
The method is never called with any headTarget besides "this".
2014-06-23 09:14:44 -04:00
Brad King 962f2c3529 cmComputeLinkDepends: Simplify CheckWrongConfigItem implementation
Combine the outer two if() conditions into a single one with &&.
2014-06-23 09:14:44 -04:00
Brad King e838e0a977 cmTarget: Simplify processILibs implementation
Combine the outer two if() conditions into a single one with &&.
Scope inner lookup result inside its condition.
2014-06-23 09:14:43 -04:00