Commit Graph

18 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
Daniel Pfeifer efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Daniel Pfeifer 3838a0d5fb make sure to include cmConfigure.h before cmStandardIncludes.h 2016-09-03 08:04:22 -04:00
Daniel Pfeifer 1d6909a287 use CM_NULLPTR 2016-06-28 09:02:26 -04:00
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Brad King 4e3cf8b012 cmOrderDirectories: Reduce repeat realpath() calls
Since commit v3.1.0-rc1~110^2 (Tolerate symlinks during RPATH ordering,
2014-09-09) we call realpath() for every directory ordering constraint
check.  On some platforms/filesystems this is slow, so memoize the
result of the call for each directory.
2015-12-01 11:00:32 -05:00
Brad King 6b18528743 cmOrderDirectories: Factor out directory comparison
Create an `IsSameDirectory` helper method.
2015-12-01 11:00:32 -05:00
Stephen Kelly a309409ead cmOrderDirectories: Port to cmGeneratorTarget. 2015-08-05 18:20:50 +02:00
Stephen Kelly b1ff32afc6 cmOrderDirectories: Re-arrange data layout.
Size goes from 680 to 672 bytes.
2015-06-07 10:24:27 +02:00
Ben Boeckel 270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -05:00
Stephen Kelly c4373b33b2 cmTarget: Make GetProperty() const.
This has follow-on effects for other methods and classes. Further
work on making the use of const cmTarget pointers common can be
done, particularly with a view to generate-time methods.
2013-10-31 14:52:11 +01:00
Sean McBride 24c4f18c72 Remove unused ivars to eliminate compiler warnings 2012-06-20 17:43:37 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 0de8be8b49 ENH: Link runtime libraries of all languages
This adds implicit libraries and search directories for languages linked
into a target other than the linker language to its link line.  For
example, when linking an executable containing both C++ and Fortran code
the C++ linker is used but we need to add the Fortran libraries.

The variables

  CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
  CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

contain the implicit libraries and directories for each language.
Entries for the linker language are known to be implicit in the
generated link line.  Entries for other languages that do not appear in
the known implicit set are listed explicitly at the end of the link
line.
2009-07-27 12:43:17 -04:00
Brad King d60608c858 STYLE: Factor CollectOriginalDirectories code
This factors code out of cmOrderDirectories::CollectOriginalDirectories
into cmOrderDirectories::AddOriginalDirectories.  Later a new call will
be added, and this is more readable anyway.
2009-07-14 10:14:41 -04:00
Brad King f8f5dde2ee ENH: Warn when system libraries may be hidden.
We never explicitly specify system library directories in linker or
runtime search paths.  Furthermore, libraries in these directories are
always linked by asking the linker to search for them.  We need to
generate a warning when explicitly specified search directories contain
files that may hide the system libraries during the search.
2008-07-29 14:57:00 -04:00
Brad King 01d143c77b ENH: Provide context in path ordering warnings 2008-07-29 14:01:04 -04:00
Brad King fd37a6ec3d ENH: Better linker search path computation.
- Use linker search path -L.. -lfoo for lib w/out soname
    when platform sets CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME
  - Rename cmOrderRuntimeDirectories to cmOrderDirectories
    and generalize it for both soname constraints and link
    library constraints
  - Use cmOrderDirectories to order -L directories based
    on all needed constraints
  - Avoid processing implicit link directories
  - For CMAKE_OLD_LINK_PATHS add constraints from libs
    producing them to produce old ordering
2008-02-21 11:41:11 -05:00