Commit Graph

23 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 a7a9239096 mark functions with CM_OVERRIDE 2016-06-27 23:24:38 +02:00
Daniel Pfeifer 618fb23fc9 Pass arguments that are not modified as const&.
Use clang-tidy's performance-unnecessary-value-param checker to find
value parameter declarations of expensive to copy types that are not
modified inside the function.  Ignore findings in kwsys.
After applying the fix-its, manually change `const T&` to `T const&`.
2016-05-26 21:58:51 +02: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
Nick Lewis 18ce97c4a2 install: Add EXCLUDE_FROM_ALL option (#14921)
Let us take an example of a project that has some tests in a component
that need to be installed into a dedicated test package.  The user
expectation is that the result could be achieved by typing the
following:

    make
    make tests
    make install
    DESTDIR=/testpkgs make install-tests

However this results in test components in the default installation as
well as the testpkg.

Add an EXCLUDE_FROM_ALL option to the install() command to tell it that
the installation rule should not be included unless its component is
explicitly specified for installation.
2016-02-04 09:16:56 -05:00
Robert Goulet 17aa6fd362 install: Allow generator expressions in FILES DESTINATION 2015-09-23 14:37:17 -04:00
Stephen Kelly 75e511eeaf cmInstallFilesGenerator: Require cmLocalGenerator, not cmMakefile. 2015-08-23 17:21:27 +02:00
Stephen Kelly 125c48660c cmInstallFilesGenerator: Re-arrange data layout.
Size goes from 296 to 288 bytes.
2015-06-07 10:24:27 +02: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
Ben Boeckel 84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Brad King 6e89c8a5f1 install: Support generator expressions in FILES and PROGRAMS mode
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.

Extend the ExportImport test to cover installation cases involving
generator expressions.
2014-02-21 17:05:26 -05:00
Brad King f11f7b34a8 cmInstallFilesGenerator: Add reference to calling cmMakefile
Add a Makefile member to the cmInstallFilesGenerator class and
populate it on construction.  This will be useful in a following
change to evaluate generator expressions with proper context.
2014-02-21 17:05:26 -05: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 f8c0dc27b5 STYLE: Remove useless install generator typedefs
The cmInstall*Generator classes all derive from cmInstallGenerator which
provides the Indent typedef so they do not need to provide it
2008-12-18 10:06:09 -05:00
Brad King 7f29f8966d ENH: Further cleanup of installation script generation. The per-component and per-configuration testing is now done in cmake code instead of in the FILE(INSTALL) command. The generation of the cmake code to do these tests is centralized in cmInstallGenerator. Old-style shared library versioning and component/config support code has been removed from FILE(INSTALL). This commit is surrounded by the tags CMake-InstallGeneratorCleanup2-pre and CMake-InstallGeneratorCleanup2-post. 2007-07-02 14:56:57 -04:00
Alexander Neundorf 617602e9e9 STYLE: preparations for the INSTALL(EXPORT ...) generator
-move std::string Destination to cmInstallGenerator, since all (except
the script one) have it and add a const accessor so it can be queried
-use temporary variables in cmInstallCommand for the generators so they can be reused easier
-some more const

Alex
2007-06-19 11:11:06 -04:00
Brad King 934c804ea4 ENH: Added OPTIONAL option to INSTALL command to allow installation of files if they exist while ignoring them otherwise. This addresses bug#2922. 2006-10-05 11:31:57 -04:00
Brad King 8a72d43c17 ENH: Started implementing INSTALL(DIRECTORY) command mode. This is not yet finished so it is undocumented and there is no test. These changes also separate the notions of file and directory permissions. 2006-08-17 14:48:54 -04:00
Brad King 50a0f71120 ENH: Added CONFIGURATIONS option to INSTALL command to allow per-configuration install rules. 2006-05-05 14:57:19 -04:00
Brad King 08b14163ee ENH: Added named component installation implementation. Installation behavior should be unchanged unless -DCOMPONENT=<name> is specified when cmake_install.cmake is invoked. 2006-03-30 13:33:48 -05:00
Brad King a2e136fd17 ENH: Added PERMISSIONS and RENAME options to the INSTALL command's FILES and PROGRAMS mode, and corresponding support to FILE(INSTALL). Default permissions for shared libraries on non-Windows/non-OSX platforms no longer has the execute bit set. 2006-03-03 18:44:32 -05:00
Brad King 518080136d ENH: Implemented FILES and PROGRAMS forms of the INSTALL command as replacements for the INSTALL_FILES and INSTALL_PROGRAMS commands. This addresses the request for absolute path install destinations in bug#2691. 2006-02-19 18:47:13 -05:00