Commit Graph

48 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
Bill Hoffman 42ce9f1e71 Add support for creating prebuilt Android.mk files
Add options to the `install()` and `export()` commands to export the
targets we build into Android.mk files that reference them as prebuilt
libraries with associated usage requirements (compile definitions,
include directories, link libraries).  This will allow CMake-built
projects to be imported into projects using the Android NDK build
system.

Closes: #15562
2016-09-13 12:47:43 -04:00
Daniel Pfeifer a7a9239096 mark functions with CM_OVERRIDE 2016-06-27 23:24:38 +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
Ben Boeckel 85fc9f26a7 stringapi: Command names 2014-03-08 13:05:39 -05:00
Brad King e33d8d2d77 Drop builtin command documentation
Drop all GetTerseDocumentation and GetFullDocumentation methods from
commands.  The command documentation is now in Help/command/*.rst files.
2013-10-16 09:22:36 -04:00
Stephen Kelly 650e61f833 Add a convenient way to add the includes install dir to the INTERFACE.
Export the INCLUDES DESTINATION without appending to the
INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target
can be exported multiple times with different INCLUDES DESTINATION
without unintended cross-pollution of export sets.
2013-07-24 17:32:58 +02:00
Stephen Kelly 574fec97fd Export: Generate INTERFACE_LINK_LIBRARIES property on targets.
This property is generated only for targets which have recorded
policy CMP0022 as NEW, and a compatibility mode is added to
additionally export the old interfaces in that case too.

If the old interfaces are not exported, the generated export files
require CMake 2.8.12. Because the unit tests use a version which
is not yet called 2.8.12, temporarily require a lower version.
2013-07-08 22:39:57 +02:00
Eric NOULARD d593cef58f Enhance DESTDIR documentation. Fixes #0012374. 2012-08-14 20:15:22 +02:00
Eric NOULARD f7365f5775 Enhance documentation of install command w.r.t. the "Undefined" component.
Inspired-By: Bill Lorensen on the mailing list.
2012-06-21 20:49:16 +02:00
Alex Neundorf 7ced0732e8 make default install component name configurable
Until now an unnamed component was always named "Unspecified".
Now this name is taken from the new cmake variable CMAKE_INSTALL_DEFAULT_COMPONENT_NAME,
which is initialized to "Unspecified". But it can now be set to something
project-specific, per directory

Alex
2012-05-14 22:19:12 +02:00
Alex Neundorf b6fba35411 -strip trailing whitespace
Alex
2012-05-13 17:38:31 +02:00
Yury G. Kudryashov 737c49a357 Add 'const' qualifier to some cmCommand members
Use const_cast for the special case in cmFindBase where
GetFullDocumentation calls GenerateDocumentation.
2012-02-29 13:27:04 -05:00
Yury G. Kudryashov a64b6185de cmInstallCommand: Remove duplicated sentence from docs
install(TARGETS ...) documentation described twice what happens on non-DLL
systems.
2012-01-17 10:02:13 -05:00
Brad King 63fbb2f67e Clarify install(TARGETS) docs for EXPORT option
Explicitly state that a call to install(EXPORT) is also needed.
2010-08-24 10:53:19 -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 1595b8e69e ENH: Add install(DIRECTORY) option 'OPTIONAL'
This adds the OPTIONAL option to the install(DIRECTORY) command.  It
tells the installation rule that it is not an error if the source
directory does not exist.  See issue #8394.
2009-02-24 11:41:40 -05:00
Brad King 202e759bbf ENH: Clarify documentation of install(TARGETS) command to refer to install target types by the upper-case keywords used when invoking the command. 2008-04-14 18:03:15 -04:00
Brad King 067717a56a BUG: Fix compatibility with CMake 2.4 for installation of MACOSX_BUNDLE targets
- Add policy CMP0006 to decide whether to use compatibility
  - OLD behavior is to fall back to RUNTIME rules
  - NEW behavior is to produce an error
2008-04-14 17:53:11 -04:00
Brad King 8401c5ba06 ENH: Allow separate installation of shared libs and their links.
- Add NAMELINK_ONLY and NAMELINK_SKIP to INSTALL command
  - Options select a \"namelink\" mode
  - cmInstallTargetGenerator selects files/link based on mode
  - See bug #4419
2008-02-04 17:03:48 -05:00
Brad King 64b6c0b950 ENH: Document PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE target properties and corresponding arguments to INSTALL(TARGETS). 2008-01-28 15:12:12 -05:00
Brad King e3b1bdb058 ENH: Support exporting/importing of AppBundle targets.
- Imported bundles have the MACOSX_BUNDLE property set
  - Added cmTarget::IsAppBundleOnApple method to simplify checks
  - Document BUNDLE keyword in INSTALL command
  - Updated IMPORTED_LOCATION property documentation for bundles
  - Updated ExportImport test to test bundles
2008-01-28 14:46:16 -05:00
Brad King 28ea034737 ENH: Support exporting/importing of Framework targets.
- Imported frameworks have the FRAMEWORK property set
  - Added cmTarget::IsFrameworkOnApple method to simplify checks
  - Also remove separate IMPORTED_ENABLE_EXPORTS property and just use ENABLE_EXPORTS since, like FRAMEWORK, it just represents the target type.
  - Document FRAMEWORK keyword in INSTALL command.
  - Updated IMPORTED_LOCATION property documentation for Frameworks
2008-01-28 13:05:58 -05:00
Brad King 5594ad4885 ENH: Updated exporting and importing of targets to support libraries and configurations.
- Created cmExportFileGenerator hierarchy to implement export file generation
  - Installed exports use per-config import files loaded by a central one.
  - Include soname of shared libraries in import information
  - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
  - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
  - Import files compute the installation prefix relative to their location when loaded
  - Add mapping of importer configurations to importee configurations
  - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
  - Scope IMPORTED targets within directories to isolate them
  - Place all properties created by import files in the IMPORTED namespace
  - Document INSTALL(EXPORT) and EXPORT() commands.
  - Document IMPORTED signature of add_executable and add_library
  - Enable finding of imported targets in cmComputeLinkDepends
2008-01-28 08:38:36 -05:00
Ken Martin 0e69d38004 ENH: add return and break support to cmake, also change basic command invocation signature to be able to return extra informaiton via the cmExecutionStatus class 2008-01-23 10:28:26 -05:00
Brad King 60bf0531b0 ENH: Added FILES_MATCHING option to INSTALL(DIRECTORY). This will help install a tree of header files while ignoring non-headers. 2008-01-02 15:17:56 -05:00
Ken Martin 8d32d229a3 ENH: make commands lower case by default 2007-10-10 11:47:43 -04:00
Alexander Neundorf 3e12a6cb91 ENH: add install files generators for targets which have PUBLIC_HEADER,
PRIVATE_HEADER or RESOURCE_FILES property, use the destination for the
public headers as include directory property for exported libraries

Alex
2007-08-27 16:04:57 -04:00
Brad King bffcff4530 ENH: Added warning when an install rule is created from an EXCLUDE_FROM_ALL target. Added a foo/preinstall version of targets that need relinking so that exclude-from-all targets can be manually relinked for installation. 2007-08-03 16:31:08 -04:00
Alexander Neundorf c0d000d234 ENH: add INSTALL(EXPORT ...) mode and INSTALL( TARGETS ... EXPORT <set> ) ,
tests still have to be added

Alex
2007-06-19 13:10:21 -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
Alexander Neundorf fe45c19666 STYLE: add some more line breaks so it should be easier to read
Alex
2007-06-15 10:34:40 -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 51607bd675 ENH: Add support to INSTALL(DIRECTORY) to install an empty directory. This addresses bug#3572. 2006-08-29 15:08:31 -04:00
Brad King 211e991057 BUG: Fixed man page formatting for INSTALL command documentation. Fixed line-too-long warning. 2006-08-22 10:38:10 -04:00
Brad King bed79f6c6b ENH: Implemented INSTALL(DIRECTORY) command and added a test. Re-organized cmFileCommand's implementation of FILE(INSTALL) a bit to help out. This addresses bug#1694 and partially addresses bug#2691. 2006-08-21 16:55:03 -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
Ken Martin ba2b99bb9f STYLE: fix line length 2006-05-11 15:50:11 -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 84f672155c BUG: Using the source-file permissions by default for installation is somewhat unpredictable because users can extract source code with almost any permissions (umask). Changing the default to use 644 for files and 755 for programs. No release has documented the old behavior so we do not need compatibility. 2006-04-18 10:30:56 -04:00
Brad King d4c5fe840b ENH: Added INSTALL(CODE) mode to allow inline specification of install script code. This reduces the need for configuring an install script that needs some variable settings because the install code can set thing up first. 2006-04-12 22:04:50 -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 ca5647c92c ENH: Added ARCHIVE option to the TARGETS mode of the INSTALL command. It is a third option added to RUNTIME and LIBRARY property types. Static libraries and import libraries are now treated as ARCHIVE targets instead of LIBRARY targets. This adds a level of granularity necessary for upcoming features. Also updated the CVS CMake patch level set in CMake_VERSION_PATCH from 4 to 5 to allow users of this version to know whether this incompatible change is present. 2006-03-24 16:11:24 -05:00
Brad King 06846c4c07 ENH: Added PERMISSIONS option to the TARGETS mode of the INSTALL command. 2006-03-03 19:29:35 -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
Brad King 96f0266228 ENH: Created new install script generation framework. The INSTALL command creates the generators which are later used by cmLocalGenerator to create the cmake_install.cmake files. A new target installation interface is provided by the INSTALL command which fixes several problems with the INSTALL_TARGETS command. See bug#2691. Bugs 1481 and 1695 are addressed by these changes. 2006-02-19 15:25:27 -05:00
Brad King b8a33fb424 ENH: Added INSTALL command as a placeholder for a future generic install specification interface. Currently it supports only a SCRIPT option specifying a script to run during the install stage. 2006-02-10 13:54:36 -05:00