Commit Graph

27 Commits

Author SHA1 Message Date
Brad King be14fe4857 Source: Stabilize include order of sys/types.h before sys/stat.h
Include the two headers in an isolated block with a comment separating
them so that tools that re-order includes do not re-order these.
2016-05-03 10:08:41 -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
Stephen Kelly 2db55ffa56 Remove borland workarounds.
CMake 3.0 is the last release to require to be able to build with
Borland.
2014-10-15 23:16:44 +02: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
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
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 cae85c9f65 Borland: No S_IWGRP is available 2010-06-03 11:18:39 -04:00
Brad King 85cbdaade2 Really trust umask in file(WRITE) command (#10789, #10126)
Commit 8d0161c8 (Trust umask for file permissions, 2010-01-12) taught
these commands to set permissions to 0666 explicitly.  The intention was
to let the open() call inside ofstream handle permsisions so that umask
would be honored.  Now we set permissions only when we need to preserve
those on an existing file.  New files will be created with umask-based
permissions.
2010-06-03 10:50:30 -04:00
Brad King 8d0161c8ff Trust umask for file permissions
Open output files with mode 0666 so that permissions are not more strict
than umask permits.  See issue #10126.
2010-01-12 11:57:01 -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 1381aab4b7 BUG: Remove check for files written by file(WRITE) being loaded.
- CMake 1.8 and below did not do the check but could get in
    infinite loops due to the local generate step.
  - CMake 2.0 added the check but failed to perform it in directories
    with no targets (see bug #678).
  - CMake 2.2 removed the local generate which fixed the problem but
    did not remove the check.
  - Between CMake 2.4 and 2.6.0rc6 the check was fixed to work even
    when no targets appear in a directory (see bug #6923).
  - Bottom line: the check is no longer needed.
2008-04-30 13:42:40 -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 cac30b5ff8 STYLE: fix line length 2006-05-12 14:12:13 -04:00
Andy Cedilnik ee1975570e ENH: Allow blocking of writing into the source tree 2006-03-22 14:40:36 -05:00
Andy Cedilnik 36e2728431 ENH: Cleanup bootstrap even more 2006-03-22 11:15:35 -05:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Andy Cedilnik c4db8aba73 STYLE: Fix typos 2005-07-06 15:51:11 -04:00
Andy Cedilnik 04bb427d1f BUG: Handle restrictive permissions 2005-03-07 13:51:18 -05:00
Andy Cedilnik 55a71ba572 ENH: Add check for infinite loops. Make sure that files written using WRITE_FILE and FILE WRITE are not used as input files. Fixes Bug #678 - WRITE_FILE and FILE(WRITE...) lead to infinite loops 2004-04-18 14:41:46 -04:00
Brad King 4888c088ae ENH: Moved ExpandListVariables out of individual commands. Argument evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside. 2002-12-11 18:13:33 -05:00
Andy Cedilnik dc919e841a Make directory if it does not exist yet 2002-11-04 15:01:40 -05:00
Andy Cedilnik 91bd207812 Add flag to WRITE_FILE to append 2002-10-29 13:32:37 -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 7ddb408621 removed some includes 2002-09-27 16:24:10 -04:00
Ken Martin f7ec3c2a76 compiler warning 2002-09-22 07:53:55 -04:00
Andy Cedilnik a77f9f0715 Fix namespace problem 2002-09-21 07:29:39 -04:00
Andy Cedilnik 92714311c9 Add WRITE_FILE command, which writes string to a file 2002-09-20 13:14:47 -04:00