Commit Graph

38 Commits

Author SHA1 Message Date
Brad King
0b33aee48b Use C++11 override instead of CM_OVERRIDE
We now require C++11 support including `override`.  Drop use of
the old compatibility macro.  Convert references as follows:

    git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
      xargs sed -i 's/CM_OVERRIDE/override/g'
2017-09-15 10:06:41 -04:00
Daniel Pfeifer
ca2233e31f IWYU: Mark cmConfigure.h with pragma: keep
Also remove `#include "cmConfigure.h"` from most source files.
2017-08-26 07:41:04 +02:00
Daniel Pfeifer
1d829c862c Use quotes for non-system includes
Automate with:

git grep -l '#include <cm_' -- Source \
  | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'

git grep -l '#include <cmsys/' -- Source \
  | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'

git grep -l '#include <cm[A-Z]' -- Source \
  | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
2017-04-11 22:35:21 +02:00
Dāvis Mosāns
f00214aa4f cmGeneratedFileStream: Add optional encoding support
This allows to save file stream in different encoding than internal
encoding.
2016-10-06 10:56:00 -04:00
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
3838a0d5fb make sure to include cmConfigure.h before cmStandardIncludes.h 2016-09-03 08:04:22 -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
Brad King
180538c706 Source: Stabilize include order
Each source file has a logical first include file.  Include it in an
isolated block so that tools that sort includes do not move them.
2016-04-29 13:58:31 -04:00
Raffi Enficiaud
81b748ae1d cmGeneratedFileStream: Fix spelling in comment
s/destionation/destination/
2015-09-17 15:30:07 -04:00
Stephen Kelly
26fb50114f Drop SGI as a CMake host compiler.
It has not been tested since commit v3.1.0-rc1~584^2 (Utilities/Release: Drop
IRIX binary generation on ferrari, 2014-04-30).
2015-01-08 22:10:14 +01:00
Ben Boeckel
d76a6e08d0 stringapi: Use strings for generated file stream names 2014-03-08 13:05:33 -05:00
Clinton Stimpson
5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -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
David Cole
867de7fc67 ENH: Add ability to call Visual Studio macros from CMake. Add a CMake Visual Studio macro to reload a solution file automatically if CMake makes changes to .sln files or .vcproj files. Add code to call the macro automatically for any running Visual Studio instances with the .sln file open at the end of the Visual Studio Generate call. Only call the macro if some .sln or .vcproj file changed during Generate. Also, add handling for REG_EXPAND_SZ type to SystemTools::ReadRegistryValue - returned string has environment variable references expanded. 2007-11-16 07:01:58 -05:00
Brad King
f0d1e1626d COMP: Fix warning about not being able to automatically generate a copy constructor. 2007-08-01 10:53:28 -04:00
Ken Martin
3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Andy Cedilnik
9ab3b14c77 COMP: Remove warning 2006-01-12 14:21:37 -05:00
Andy Cedilnik
867c3a763e ENH: Add support for binary 2006-01-11 19:06:54 -05:00
Andy Cedilnik
b7ba65ed68 ENH: Add a way to overwrite compression extension 2006-01-02 07:52:54 -05:00
Andy Cedilnik
efcb43a88f ENH: Allow changing of file name 2005-05-10 11:11:28 -04:00
Brad King
bac564356b COMP: Added pragma directives for SGI compilers to avoid useless warnings. 2005-05-03 14:58:13 -04:00
Brad King
389f24f777 ENH: Added Close method and updated Open method to allow streams to be reused. 2005-04-05 08:25:21 -04:00
Andy Cedilnik
14477cee6e ENH: Add compression support 2005-01-27 10:14:24 -05:00
Brad King
aaac6f2c3a ENH: Added default constructor and Open method. 2005-01-26 14:25:16 -05:00
Brad King
a5ae290a5b STYLE: Adjusted signature of cmGeneratedFileStream to make copy-if-different more explicity. 2004-11-03 07:51:51 -05:00
Brad King
e34207c1f0 COMP: Fix new cmGeneratedFileStream for MSVC. 2004-11-03 07:27:44 -05:00
Brad King
d46d8df0ed ENH: Re-implemented cmGeneratedFileStream to look like a real stream and replace the destination file atomically. This will avoid problems with the process being terminated while generating a file. 2004-11-03 07:23:18 -05:00
Bill Hoffman
70eaddbf8e BUG: make sure global generate is done when cmakelist file chagnes, also make sure guids are stored in the cache so the .sln file does not change every time 2004-05-20 16:29:09 -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
Will Schroeder
a6a43d5320 ENH:Updated copyright 2002-01-21 15:30:43 -05:00
Bill Hoffman
b6d823a7c1 ENH: try to better handle control-c during make Makefiles 2001-06-04 11:34:22 -04:00
Bill Hoffman
d76db0ed57 BUG: remove warning 2001-05-23 10:47:50 -04:00
Bill Hoffman
1094200ea0 BUG: fix to compile on hp with aCC 2001-05-17 11:44:26 -04:00
Brad King
d055ebb8c5 ERR: const error fixed. 2001-05-16 17:18:01 -04:00
Brad King
99a9fd6b3f ERR: Added is_open() check in cmGeneratedFileStream::operator bool() so that implicit conversion to bool is not used. 2001-05-16 17:11:38 -04:00
Brad King
8011fe0fad ENH: cmGeneratedFileStream class added to simplify copy-if-different usage on generated files. 2001-05-16 16:40:45 -04:00