Commit Graph

44 Commits

Author SHA1 Message Date
Regina Pfeifer
d25a5a7ec9 clang-tidy: modernize-use-auto
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators.  Leave new expressions and cast
expressions for later.
2019-09-10 22:21:41 +02:00
Regina Pfeifer
55671b41d2 clang-tidy: Use = default
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
2019-01-25 06:44:32 -05:00
Pavel Solodovnikov
7d5095796a Meta: modernize old-fashioned loops to range-based for.
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
2017-09-12 16:22:47 +03:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
b1ec5deaf1 Pass large types by const&, small types by value 2017-06-04 00:48:21 +02:00
Daniel Pfeifer
d6f0006c0b Use CM_DISABLE_COPY 2017-04-24 22:03:06 +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
Daniel Pfeifer
41ec352832 IWYU: use pragma export 2017-03-23 23:38:46 +01: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
e7b842e189 Make sure unnused parameters are /*named*/ 2016-08-17 01:49:57 +02: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
Ben Boeckel
270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -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
Brad King
1d38a3e09e BUG: Removed compiled-in CMAKE_SHARED_MODULE_PREFIX and CMAKE_SHARED_MODULE_SUFFIX for loaded commands in favor of using the settings from the platform files. 2006-03-16 17:09:08 -05:00
Andy Cedilnik
f483e48d2a ENH: Cleanup DynamicLoader so that the symbols have more consistent names, start using dynamic loader from kwsys in CMake 2006-03-16 11:01:05 -05:00
Ken Martin
3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Bill Hoffman
4c1ae1b5af ENH: fix for bug 2808, use dlopen on new OSX versions 2006-02-16 10:35:18 -05:00
Bill Hoffman
2a8f981bee ENH: fix compile error bug# 2020 on mac 2005-07-15 11:34:39 -04:00
Bill Hoffman
5bf55d1590 ENH: shorten the symbols a bit and remove maps of std::string for map of cmStdString 2004-09-29 16:07:07 -04:00
Bill Hoffman
c5be64081a bug fix for 986 2004-07-19 13:00:32 -04:00
Bill Hoffman
8f565bdc74 BUG: don't crash when loading a module that does not exist 2004-02-17 08:35:23 -05:00
Bill Hoffman
c60f2fabc4 ENH: use cmake variables for cmDynamicLoader to figure out library prefix and extensions 2004-02-16 10:48:54 -05:00
Bill Hoffman
07b4d8bbca BUG: fix mingw module load tests 2004-02-16 09:50:06 -05:00
Bill Hoffman
a413160fec ENH: add the unix makefile generator as an option from the windows GUI, this builds with mingw, cygwin, and combinations of make cl, bcc32 2003-08-21 16:22:23 -04:00
Bill Hoffman
8cb6645ad8 Remove some borland 6 warnings 2003-05-28 09:21:37 -04:00
Ken Martin
03bba128f3 fix one warning 2003-04-17 08:47:15 -04:00
Ken Martin
0431b126b2 fix one warning 2003-04-16 16:20:37 -04:00
Andy Cedilnik
304582d208 Attempt to make unloading work on OSX 2003-04-16 14:13:34 -04:00
Bill Hoffman
0f19623edd BUG: fixes for hp 2003-03-11 15:25:50 -05:00
Bill Hoffman
a551bfcafc fix free before use 2002-12-05 16:52:55 -05: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
Ken Martin
cceb68f2a0 Remove memory leak caused by cmDynamicLoader not being deleted properly 2002-10-09 17:47:24 -04:00
Bill Hoffman
a63f7ba43c BUG: fix load command stuff for cygwin and cleanup at exit 2002-09-30 16:25:02 -04:00
Andy Cedilnik
e00b56dd57 Add accessor for Flushing cache 2002-09-24 10:24:56 -04:00
Bill Hoffman
94f1e8f5c5 fix for cygwin and nmake that does not define WIN32 2002-09-24 09:24:39 -04:00
Andy Cedilnik
7fb39f7e3b Fix cache for non void* types 2002-09-23 16:57:51 -04:00
Andy Cedilnik
1b4171c5e4 Keep track of libraries so that you can load them as many times as you want... 2002-09-23 16:24:59 -04:00
Andy Cedilnik
2a21a66b13 Fix extension and suffix for modules on mac 2002-09-23 15:53:40 -04:00
Brad King
b9db890ebc ENH: Pointer-to-function to pointer-to-data casts are not even allowed in strict C. Re-implemented this conversion in pure C++ using a casting trick with an extra level of indirection. 2002-09-11 09:54:03 -04:00
Brad King
820088cefc ERR: Cast from pointer-to-data to pointer-to-function is not allowed in C++. The cast needed by cmDynamicLoader::GetSymbolAddress is now hidden in a C file. 2002-09-10 15:46:49 -04:00
Ken Martin
7e0655f290 removed some couts 2002-09-05 08:22:47 -04:00
Ken Martin
9184cac1ff added plugin support 2002-08-21 11:58:01 -04:00