Commit Graph

15 Commits

Author SHA1 Message Date
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 1df49282a5 add_subdirectory: Compute output dir with consistent slashes (#10072)
When the command is invoked without an explicit build directory path we
compute it from the source directory path.  When either the source or
build tree is the root of a Windows drive letter it will have a trailing
slash.  Handle slashes consistently when substituting the current output
directory for the current source directory.

While at it, use cmSystemTools::IsSubDirectory instead of FindLastString
to verify that the source directory is a subdirectory.

Inspired-by: Graham Menhennitt <graham@menhennitt.com.au>
2013-03-12 11:52:52 -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 b99129d2d8 ENH: some code cleanup 2007-03-12 10:26:59 -04:00
Brad King e09dd5db09 BUG: Fix automatic computation of binary path to work for subdirectories of out of source directories. This addresses bug#3592. 2006-08-31 16:40:38 -04:00
Brad King a7441ce80e COMP: Removed unused variable. 2006-06-05 15:28:33 -04:00
Brad King df70e3de66 BUG: Always check whether a subdirectory is below the top of the source before computing the binary tree automatically. Even when the source is a relative path it may contain ../ which would allow it to be outside the source tree. 2006-06-05 14:38:16 -04:00
Ken Martin b8483cf109 STYLE: fix line length 2006-05-11 10:40:28 -04:00
Ken Martin aae0bcdacf STYLE: fix line length 2006-05-10 13:50:44 -04:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Ken Martin 4cb9d2fd96 ENH: better format for ADD_SUBDIRECTORY command 2005-09-12 13:46:16 -04:00
Ken Martin 664a93121f ENH: removed the PREORDER option from the AddSubDirectory command 2005-05-31 15:10:04 -04:00
Ken Martin 1f9df24ba7 ENH: added immediate subdirectory command 2005-03-18 10:39:21 -05:00