Commit Graph

24793 Commits

Author SHA1 Message Date
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
Brad King 2463797996 cmTarget: Refactor ComputeLinkImplementation
Use LinkImplementationPropertyEntries directly instead of asking
GetProperty to construct a string for LINK_LIBRARIES.  This gives us
access to the entry backtraces.
2014-06-25 10:33:36 -04:00
Brad King 7812d2a912 cmTarget: Pre-indent a block in ComputeLinkImplementation
Prepare to move it into another block without extra whitespace changes.
2014-06-25 10:33:36 -04:00
Brad King f48d8bd6f6 cmTarget: Shorten a long line in ComputeLinkImplementation
Prepare to change its indentation without exceeding line length limit.
2014-06-25 10:33:36 -04:00
Brad King 7b0834e9bb cmTarget: Refactor internal LinkImplementation map
If ComputeLinkImplementationLanguages were ever to cause
GetLinkImplementationLibraries to be invoked then a LinkImplMap entry
may appear in the middle of computing it in GetLinkInformation.  Instead
create the map entry up front and store in it boolean values indicating
which pieces of the LinkImplementation structure have been populated.
This approach leads to shorter code that is easier to follow too.
2014-06-25 10:33:36 -04:00
Brad King b8651d970d cmTarget: Remove unnecessary 'mutable' markup
Members of the cmTargetInternals structure do not need to be made
'mutable' even to cache data because there is no reason for the
internal methods to be 'const'.
2014-06-25 10:33:36 -04:00
Brad King 0192be5181 cmTarget: De-duplicate link interface evaluation for $<LINK_ONLY>
Teach GetTransitivePropertyTargets to use the GetLinkInterfaceLibraries
method with usage_requirements_only==true instead of evaluating the
INTERFACE_LINK_LIBRARIES property directly.  This avoids duplicate
evaluations and makes use of the caching done by
GetLinkInterfaceLibraries.
2014-06-25 10:20:52 -04:00
Brad King 6ead631bf9 cmTarget: Teach GetLinkInterfaceLibraries to support $<LINK_ONLY>
Add a 'usage_requirements_only' parameter to GetLinkInterfaceLibraries
and supporting internal APIs to pass through to ExpandLinkItems so it
knows whether to use SetTransitivePropertiesOnly while evaluating
generator expressions.
2014-06-25 10:01:56 -04:00
Brad King b030a7f1ca cmTarget: De-duplicate link interface genex code for $<LINK_ONLY>
Simplify the implementation of GetTransitivePropertyTargets by using
ExpandLinkItems with usage_requirements_only==true to evaluate the
generator expressions in the link interface for us.
2014-06-25 09:32:38 -04:00
Brad King 1001490df2 cmTarget: Teach ExpandLinkItems how to support $<LINK_ONLY>
Add a 'usage_requirements_only' parameter to ExpandLinkItems so that it
knows whether to use SetTransitivePropertiesOnly while evaluating
generator expressions.  Update existing call sites to pass 'false' since
they are for linking and not usage requirements.
2014-06-25 09:32:21 -04:00
Brad King 3bae343f62 cmCPackGenerator: Avoid crash on undefined CMAKE_MAKE_PROGRAM
Since commit 6557382d (stringapi: Use strings for program
paths, 2014-02-24), cmGlobalGenerator::GenerateBuildCommand
takes the make program path as a std::string.  Fix the lookup
in cmCPackGenerator::InstallProjectViaInstallCMakeProjects to
use GetSafeDefinition for CMAKE_MAKE_PROGRAM to avoid possible
construction of std::string from a NULL.

Reported-by: Richard Wirth <richard@califax.de>
2014-06-25 09:18:27 -04:00
Kitware Robot 6c383f89a1 CMake Nightly Date Stamp 2014-06-25 00:01:10 -04:00
Brad King 8635ac2330 Tests/Preprocess: Remove unnecessary VS version tests
Since commit v2.8.12~436^2 (VS 10: Escape ; as %3B in preprocessor
definitions, 2013-04-11) the Tests/Preprocessor/CMakeLists.txt file no
longer uses the PP_VS1XX values, so stop setting them.
2014-06-24 15:38:24 -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 d19b64d671 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)
Installing large directories, e.g., the output of a doxygen run, prints
one line per file resulting in too much noise in the build output.  Add
an option to the install(DIRECTORY) command to not print anything upon
make install.

Extend the RunCMake.install test with cases covering MESSAGE_NEVER
behavior of the install(DIRECTORY) command.

Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
2014-06-24 13:18:20 -04:00
Brad King c9568de52c install: Add CMAKE_INSTALL_MESSAGE variable (#13761)
Create a variable to allow users to control which installation
messages are printed.  In particular, provide a "LAZY" setting
that prints "Installing" messages but not "Up-to-date" messages.
This is desirable for incremental re-installations.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-06-24 13:18:20 -04:00
Brad King ec7cf7ea13 install: Thread message level setting through internal API
Create a cmInstallGenerator::MessageLevel enumeration for future use in
specifying install message verbosity.  Thread values of the type through
constructors and save the value as a member of cmInstallGenerator.
Use only a "MessageDefault" value for now.
2014-06-24 13:12:02 -04:00
Brad King abebcd235c file(INSTALL): Add undocumented options to control output verbosity
Create options "MESSAGE_ALWAYS", "MESSAGE_LAZY", and "MESSAGE_NEVER" to
specify whether to print the "Installing" and "Up-to-date" messages.
Extend the RunCMake.file test with cases covering these options.
2014-06-24 13:11:45 -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
Brad King 464567a577 file(INSTALL): Report existing DIRECTORY as Up-to-date
Teach cmFileCopier::InstallDirectory to detect whether the destination
directory exists.  If so, report it as "Up-to-date" instead of
"Installing".  This resolves message asymmetry with file installations.

Extend the RunCMake.file and RunCMake.install tests to check the
installation output on both the first and second run.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-06-24 12:52:11 -04:00
Brad King f701b0b7f7 file(INSTALL): Do not pre-create DESTINATION for DIRECTORY
When installing a DIRECTORY, do not pre-create the DESTINATION.  The
cmFileCopier::InstallDirectory method will create the directory anyway.
Give it a chance to detect whether the directory already exists or not.
2014-06-24 12:52:11 -04:00
Brad King f0a0196250 cmInstallTargetGenerator: Drop default constructor arguments
They are used only in cmLocalGenerator::GenerateTargetInstallRules.
Move the defaults to a local helper where the context justifies their
values.
2014-06-24 12:52:11 -04:00
Brad King 67815894ca Help: Add install() command document section headers
Use section headers instead of horizontal dividers so that one may link
to the sections.
2014-06-24 12:52:11 -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