Commit Graph

34 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 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 356c26ebdf cmSystemTools: Teach RunSingleCommand to separate stdout and stderr
Extend the RunSingleCommand signature to capture stdout and stderr
separately.  Allow both to be captured to the same std::string
to preserve existing behavior.  Update all call sites to do this
so that this refactoring does not introduce functional changes.
2015-04-20 15:47:50 -04:00
Stephen Kelly f081c5bddd cmState: Move CacheEntryType enum from cmCacheManager. 2015-04-13 11:44:16 -04:00
Stephen Kelly 5f69314ea6 Replace foo.length() pattern with !foo.empty(). 2015-01-18 14:25:25 +01:00
Stephen Kelly 21c573f682 Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
2014-03-11 15:03:50 +01: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
Johan Björk 856a9e499f RunSingleCommand: Replace verbose boolean with enum
No behaviour change, this prepares for adding a flag to skip the merging
of output streams.
2011-07-28 10:42:03 -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
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
Ken Martin daa37f1163 STYLE: fix line length 2006-05-12 13:53:21 -04:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Bill Hoffman e78cf5ca6f BUG: fix for bug 689 2004-04-15 11:38:35 -04:00
Andy Cedilnik c237e0ac68 ENH: Do not use nslookup. All we really care is hostname. If somebody wants something fancy, just set it yourself. Fixes Bug #407 - nslookup is being deprecated for Red Hat and Fedora distributions 2003-12-29 16:10:15 -05:00
Andy Cedilnik 2c33b3db65 ENH: Use new RunCommand 2003-08-03 22:41:34 -04:00
Andy Cedilnik 1d3921b4ca ENH: Use the new signature 2003-08-03 22:34:59 -04:00
Brad King 38482b46d1 ENH: Merged use of the kwsys RegularExpression class instead of cmRegularExpression. 2003-06-23 14:10:12 -04:00
Brad King 1f6a3c67b1 ENH: Added reference to Copyright.txt. Removed old reference to ITK copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs. 2002-10-23 18:03:27 -04:00
Bill Hoffman 4879c6cffa ENH: look for nslookup and hostname in the right places 2002-04-26 09:35:03 -04:00
Bill Hoffman 9b0a90fa9e fix up hostname for windows 2002-04-25 15:40:04 -04:00
Bill Hoffman 7d76de4403 make sure ; expansion is done in all commands 2002-03-29 14:20:32 -05:00
Will Schroeder a6a43d5320 ENH:Updated copyright 2002-01-21 15:30:43 -05:00
Sebastien Barre 4d0e5c0201 FIX: if the 'hostname' and 'nslookup' commands were not found from their HOSTNAME and NSLOOKUP cache definition, hard-coded values were used instead, thus causing pb if the corresponding progs were not in the PATH (RunCommand). Now use FindProgram() to be sure to find both, otherwise do nothing and set the site name to "unknown" (arbitrary. could be empty string ? or error ?). 2002-01-19 21:22:55 -05:00
Sebastien Barre 99c9d77f21 Fix: argument was not used. 2002-01-18 11:38:05 -05:00
Sebastien Barre 5cc95e4387 SITE_NAME should return the most qualified name of the host. If nslookup works, now the domain is appended to the hostname (whereas it *replaced* the host name before) 2001-10-18 18:01:19 -04:00
Bill Hoffman baa28efd10 ENH: change InitialPass to take a const reference to the argument string, to avoid changes to the file cache 2001-09-20 15:08:30 -04:00
Bill Lorensen 275b334f8b ENH: drop the case of the site name. This makes it consistent with Dart's usage. 2001-09-12 17:09:40 -04:00
Bill Hoffman 333e2dbf63 BUG: can not Add a definition that you just got 2001-08-08 13:14:44 -04:00
Bill Hoffman db1303aa7d ENH: big change, only allow commands access to the cache via the cmMakefile class and GetDefinition, also the cmMakefile is the only way for commands to add to the cache. Also, some changes to configure.in that check for for scoping 2001-08-08 11:54:46 -04:00
Jim Miller d2c2cf3296 FIX: added AddDefinition() to store site name and build name in makefile. Also stripped
white space from the result of hostname.
2001-06-25 13:34:09 -04:00
Bill Hoffman 9922155423 ENH: rename Invoke to InitialPass 2001-06-06 13:19:15 -04:00
Dan Blezek f386664efc ENH: Correct sitename 2001-05-04 16:43:54 -04:00
Bill Hoffman 8a21493f56 ENH: move testing stuff to cmake from configure, good bye dashboard... :) 2001-05-04 11:34:59 -04:00