Commit Graph

22 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 5d0d980d99 Use string(APPEND) in Modules
Automate with:

find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:41:13 +02:00
Rolf Eike Beer 7eacbaed4d Replace MATCHES ".+" tests with NOT STREQUAL "" 2014-04-14 18:17:23 +02:00
Rolf Eike Beer 3a71d34cf3 Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient 2014-04-14 18:17:18 +02:00
Rolf Eike Beer b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04: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
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 3a666595c9 Convert CMake non-find modules to BSD License
This adds copyright/license notification blocks CMake's non-find
modules.  Most of the modules had no notices at all.  Some had notices
referring to the BSD license already.  This commit normalizes existing
notices and adds missing notices.
2009-09-28 11:46:51 -04:00
Bill Hoffman 9891260a6d ENH: add support for watcom wmake and wcl386 2006-01-17 10:21:45 -05:00
Ken Martin d2689c95a1 ENH: some style fixes for the book 2005-12-15 10:41:19 -05:00
Bill Hoffman b7fa820118 ENH: add documentation support for modules 2005-12-14 13:51:08 -05:00
Andy Cedilnik ad4f98f3cf ENH: Cleanup. Use relative path to modules 2004-08-26 22:52:53 -04:00
Bill Hoffman 4d6dba4c37 ENH: only force the use of ansi flags in backwards mode 2003-01-08 12:12:15 -05:00
Bill Hoffman 96189f79d5 ENH: unify EnableLanguage across all generators 2002-12-05 13:44:11 -05:00
Bill Hoffman c54a86edd6 have to cache ansi_cxxflags 2002-11-21 13:28:03 -05:00
Bill Hoffman 369d5f631c spelling error 2002-11-21 13:00:51 -05:00
Bill Hoffman 9a6c95fcea add checks for ansi flags and not hard code them 2002-11-21 12:52:54 -05:00
Bill Hoffman f5d95fb078 Complete rework of makefile generators expect trouble 2002-11-08 15:46:08 -05:00
Andy Cedilnik b5de000f26 Improve backward compatibility, so that all backward compatibility stuff is in two modules; fix invoking of try_compile; add checking for header files and sizes of types 2002-09-24 17:58:38 -04:00