Commit Graph

33 Commits

Author SHA1 Message Date
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 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
Brad King 83af11d411 Fix preprocessor checks WIN32 => _WIN32
The latter is predefined by Windows toolchains and is more reliable.

Reported-by: Michael Stürmer <michael.stuermer@schaeffler.com>
2015-06-15 09:58:29 -04:00
Stephen Kelly fd7b371293 Replace foo.size() pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly d92887efab Replace 'foo.size() > 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +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
Brad King 52b80b2643 exec_program: Re-implement using KWSys Process
Drop use of cmSystemTools::RunCommand.  It used popen on UNIX
(equivalent to /bin/sh -c "$command") and direct CreateProcess calls on
Windows.  Implement equivalent behavior using the KWSys Process library.
Copy windows shortpath conversion logic from cmSystemTools::RunCommand.
2013-10-19 07:21:09 -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
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 bb88ef5e41 STYLE: fix line length 2006-05-10 15:08:38 -04:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Bill Hoffman 78cc9adbd2 BUG: exec program should not fail if it can not exec the program, but should only set the return value to -1 and set the output to the reason for the failure. 2004-06-24 08:57:54 -04:00
Bill Hoffman 2705b1bf73 BUG: fix spaces in path on mingw, and change EXEC_PROGRAM to return false when it does not run, also do not convert the directory to an output path for EXEC_PROGRAM as this is done by the process execution, and doing it twice may cause trouble on some shells. 2004-06-23 16:34:38 -04:00
Bill Hoffman f5d95fb078 Complete rework of makefile generators expect trouble 2002-11-08 15:46:08 -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
Bill Hoffman 48b74fd034 ENH: if output variable turn verbose off 2002-10-23 16:57:21 -04:00
Bill Hoffman 8cdb9a316f BUG: get all the output including the last character 2002-10-08 10:53:32 -04:00
Ken Martin 4dec2a174a remove unused variables 2002-09-15 09:54:08 -04:00
Andy Cedilnik a898cfb17a Add return value support and add documentation 2002-08-08 15:29:19 -04:00
Andy Cedilnik c41c7a6a9a Add option of storing output to the variable 2002-08-08 15:13:20 -04:00
Bill Hoffman 65e3edea04 ENH: use separate vars for creating c++ and c shared libraries and add a test for c libraries 2002-04-08 13:36:18 -04:00
Bill Hoffman d42055b283 ENH: fix more space problems, you can add args to the ExecProgram command separatly now 2002-04-03 16:14:06 -05:00
Bill Hoffman 567edf0e9a ENH: overhaul of RunCommand on windows, if only win32 had popen... 2002-03-14 11:11:39 -05:00
Bill Hoffman 4651dbcfc6 ENH: expand variables in arguments before the commands get them 2002-03-05 18:41:24 -05:00
Bill Hoffman 8c3400dc6b ENH: big change in the path handling, one function CreateOutputPath is used to escape spaces and convert to the native path type 2002-02-22 13:38:33 -05:00
Will Schroeder a6a43d5320 ENH:Updated copyright 2002-01-21 15:30:43 -05:00
Sebastien Barre 5ab173b5ea Fix: "cd arg2 ; arg1" not working. OK with &&. Also should prevent from: "cd non_existing_dir_oops && rm -fr *" 2002-01-18 20:33:28 -05:00
Sebastien Barre 6d1a312c7b Fix bug: was expanding second arg even if not passed. crashed 2002-01-18 11:48:16 -05: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 Hoffman 9922155423 ENH: rename Invoke to InitialPass 2001-06-06 13:19:15 -04:00
Bill Hoffman 885e37da22 ENH: call configure from cmake 2001-05-07 18:11:16 -04:00