Commit Graph

19 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
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
Stephen Kelly c7b79aa16a cmGlobalGenerator: Require a cmake instance in ctor.
It is required anyway, so this makes it explicit.
2015-05-27 09:18:31 -04:00
Stephen Kelly 036372c4cd Remove obsolete overrides of CreateLocalGenerator.
The cmGlobalMakefileGenerator3 has an identical implementation.
2015-05-18 20:06:20 +02:00
Stephen Kelly a48aebcb67 cmLocalGenerator: Require a parent in the constructor.
Pass the parent though cmGlobalGenerator::CreateLocalGenerator.

This will make it easy to initialize state scopes independent of
cmMakefile.
2015-04-28 07:50:52 +02:00
Brad King 4adf1dad2a Makefile: Tell GNU make to delete rule outputs on error (#15474)
Add .DELETE_ON_ERROR to the "build.make" files that contain the actual
build rules that generate files.  This tells GNU make to delete the
output of a rule if the recipe modifies the output but returns failure.
This is particularly useful for custom commands that use shell
redirection to produce a file.

Do not add .DELETE_ON_ERROR for Borland or Watcom make tools because
they may not tolerate it and would not honor it anyway.  Other make
tools that do not understand .DELETE_ON_ERROR will not be hurt.

Suggested-by: Andrey Vihrov <andrey.vihrov@gmail.com>
2015-03-30 16:35:48 -04:00
Geoff Viola bef23e8181 Fix some spelling errors in comments 2014-10-13 10:00:53 -04:00
Ben Boeckel 1a1b737c99 stringapi: Use strings for generator names 2014-03-08 13:05:38 -05:00
Brad King bd11de0857 Makefile: Allow "gmake target1 target2 -j" (#14312)
Add the .NOTPARALLEL target to each local Makefile command-line
interface entry point file so that even with -j we launch only
one "make -f Makefile2" at a time.  The actual build rules
in Makefile2 and lower will still run in parallel.

Do not add .NOTPARALLEL for Borland or Watcom make tools because
they do not tolerate it.  Other make tools that do not understand
.NOTPARALLEL will not be hurt.

Suggested-by: Robert Luberda <robert-cmake@debian.org>
2013-12-20 09:35:20 -05:00
Patrick Gansterer 5170a8800f Make cmGlobalGenerator::GetDocumentation() a static function
Making the function static allows us to call it directly,
without creating and removing an instance of the generator.
2012-11-19 12:54:50 -05:00
Patrick Gansterer e8f841473b Introduce the abstract class cmGlobalGeneratorFactory
This new abstract class allows us move some logic from the
cmGlobalGenerator into its own layer in a next step.
2012-11-19 12:54:30 -05:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -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
Alexander Neundorf 7b917000aa STYLE: use correct case for cmGlobalUnixMakefileGenerator3
make export() work with spaces in the path

Alex
2007-08-09 15:57:30 -04:00
Alexander Neundorf 43de8c8628 ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be possible to do
something like this:

ENABLE_LANGUAGE(ASM-ATT)
IF(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... do assembler stufff
ELSE(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... fallback to generic C/C++
ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS)

Alex
2007-06-28 09:09:26 -04:00
Bill Hoffman 89e5fc63fe STYLE: fix line lengths 2006-03-10 13:54:57 -05:00
Bill Hoffman 9891260a6d ENH: add support for watcom wmake and wcl386 2006-01-17 10:21:45 -05:00