Commit Graph

11 Commits

Author SHA1 Message Date
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Aurélien Gâteau 34cd5fc451 find_dependency: Give more helpful message if VERSION is empty 2014-03-13 15:51:11 -04:00
Stephen Kelly 224f50f42f find_dependency: Make sure invalid EXACT use can be reported.
Test the first argument directly for matching 'EXACT'. The error
check in its previous position was incorrect and would only trigger
with a version of '0' or similar.
2014-03-11 14:51:06 +01:00
Stephen Kelly 08ba128f51 find_dependency: Don't propagate EXACT argument.
If a package is requested with an EXACT version, that doesn't imply
that dependencies must be found EXACTly too.

Extend the macro to allow specifying that a dependency must be found
by EXACT version instead.
2014-03-06 15:07:37 +01:00
Alex Merry 3d8f7102bb find_dependency: unset cmake_fd_version variable at end of macro
This matches the other macro variables.
2014-02-26 10:27:01 -05:00
Alex Merry 85d0f8de7e find_dependency: use correct version variable name
The code set cmake_fd_version, but used ${version}.
2014-02-26 10:27:01 -05:00
Stephen Kelly 2be6dbe420 find_dependency: Ensure that ARGV1 has valid local content
The ARGV1 value could come from a wrapping context if find_dependency
is called from a function.
2014-02-24 19:00:42 +01:00
Stephen Kelly a35ce7235b find_dependency: Add namespacing for variables in the macro.
Avoid setting a variable called 'version' etc.
2014-02-24 19:00:31 +01:00
Alex Merry 5878c5d919 Always set version variable of find_dependency macro
If there is no ARGV1, that is fine; version will be made empty, and no
version will be passed to find_package().

This is relevant when find_dependency is invoked multiple times,
sometimes with a version specified and sometimes without.

 find_dependency(dep1 3.4)
 find_dependency(dep2) # version still set to 3.4.
2014-02-23 11:31:30 +01:00
Stephen Kelly a6971f6510 FeatureSummary: Don't list transitive package dependencies
Set a global property in the find_package implementation.  Track and
reset that property in the find_dependency macro.  Read the property
in FeatureSummary when determining whether to print output.

This means that packages which are found only as dependencies are not
listed by FeatureSummary, but if a project uses find_package elsewhere
directly, then it will be listed by FeatureSummary.

Suggested-by: Alex Merry

 http://thread.gmane.org/gmane.comp.kde.devel.frameworks/10640
2014-02-03 20:20:42 +01:00
Stephen Kelly 20cafa2e1f Split the find_dependency macro into a separate file.
This allows Config file authors to use it without having to use
CONFIGURE_PACKAGE_CONFIG_FILE.
2013-12-13 16:14:02 +01:00