Daniel Pfeifer
5cec953e6a
Use std::replace for replacing chars in strings.
...
Find uses of `cmSystemTools::ReplaceString` where both `replace` and
`with` are string literals with a size of one.
Automate with:
git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g"
git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g"
git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
2016-05-24 23:22:20 +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
Brad King
3144857e1e
Avoid depending on CMAKE_ROOT cache entry internally ( #16015 )
...
Use cmSystemTools::GetCMakeRoot() which always knows the location of our
resources. Do not depend on CMAKE_ROOT because the user could unset it
from the cache.
2016-03-16 09:03:26 -04:00
Stephen Kelly
54d6a9187f
cmMakefile: Rename GetCurrent{Output,Binary}Directory.
...
Match names used in CMake code.
2015-04-21 00:12:52 +02: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
Yury G. Kudryashov
43d60114a5
Run vim spellcheck on some files
2012-02-29 14:07:50 -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
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
Brad King
35936433e1
ENH: Merging changes from branch CMake-SourceFile2-b between tags
...
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk. This
commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and
CMake-SourceFile2-b-mp1-post on the trunk.
The changes re-implement cmSourceFile and the use of it to allow
instances to be created much earlier. The use of cmSourceFileLocation
allows locating a source file referenced by a user to be much simpler
and more robust. The two SetName methods are no longer needed so some
duplicate code has been removed. The strange "SourceName" stuff is
gone. Code that created cmSourceFile instances on the stack and then
sent them to cmMakefile::AddSource has been simplified and converted
to getting cmSourceFile instances from cmMakefile. The CPluginAPI has
preserved the old API through a compatibility interface.
Source lists are gone. Targets now get real instances of cmSourceFile
right away instead of storing a list of strings until the final pass.
TraceVSDependencies has been re-written to avoid the use of
SourceName. It is now called TraceDependencies since it is not just
for VS. It is now implemented with a helper object which makes the
code simpler.
2007-06-18 11:59:23 -04:00
Ken Martin
5d11564c35
ENH: allow source file properties to chain to Directories and up
2006-12-13 12:19:59 -05:00
Ken Martin
27379d7b08
ENH: make properties a bit more formal with documentation and chaining
2006-12-07 09:45:32 -05:00
Ken Martin
3d96e52261
STYLE: some m_ to this-> cleanup
2006-03-15 11:02:08 -05:00
Andy Cedilnik
634343c3e8
STYLE: Fix some style issues
2006-03-10 13:06:26 -05:00
Bill Hoffman
b41d447935
ENH: use GetRequiredDefinition instead of GetDefinition and crash
2004-08-11 16:58:09 -04:00
Andy Cedilnik
42bc978b5b
BUG: When creating a test driver, do not remove the old file, so if nothing changes, it will not rebuild. Fixes Bug #885 - cmCreateTestSource overwrite file when running cmake
2004-05-27 12:56:52 -04:00
Bill Hoffman
e539cf9f7c
ENH: make test driver more flexible by using a configured file instead of generating all the code. fixes bug 28
2004-04-28 12:31:18 -04:00
Ken Martin
737d2fc7d6
fix compiler warning
2003-12-15 12:56:13 -05:00
Bill Hoffman
711febc82d
ENH: null terminate at the end of the list
2003-07-03 11:39:33 -04:00
Ken Martin
49c8ca5bca
undid change because other changes make it no longer neccesary
2003-06-06 09:06:12 -04:00
Ken Martin
b1095dd2f0
minor fix
2003-06-05 14:37:00 -04:00
Brad King
9676bb4b22
BUG: Generate 0 into test driver instead of NULL.
2003-02-05 18:05:12 -05: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
Brad King
3bcbca96ab
ENH: Improved implementation of MSVC debug hook to only add the hook if DART_TEST_FROM_DART is set in the environment. This is better than always adding the hook and testing the environment from the callback.
2002-12-11 14:15:35 -05:00
Brad King
e9e3855c65
ENH: Generate code to setup MSVC debug library hook. The test driver program will not display error dialogs if DART_TEST_FROM_DART is set in the environment.
2002-12-11 11:32:43 -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
Andy Cedilnik
c3007233ec
Rename variables to remove warnings
2002-10-17 10:51:23 -04:00
Ken Martin
7ddb408621
removed some includes
2002-09-27 16:24:10 -04:00
Ken Martin
7b5a8762c6
modified how source files store properties
2002-08-16 11:20:18 -04:00
Ken Martin
e1b6ba9f95
fixed some compiler warnings and leaks
2002-08-08 08:51:40 -04:00
Ken Martin
86709a4ccf
fixed some compiler warnings and leaks
2002-08-07 11:01:06 -04:00
Ken Martin
3704cc268e
fixed some compiler warnings and leaks
2002-08-07 10:30:38 -04:00
Ken Martin
1538956b7f
fixed support for C test programs
2002-07-31 11:07:09 -04:00
Sebastien Barre
843616ec7e
FIX: <stdlib.h> is enough to get malloc()/free()
2002-07-31 09:29:58 -04:00
Ken Martin
0f6e022dca
updated to handle extensions
2002-07-30 16:19:14 -04:00
Sebastien Barre
c05e3613ce
FIX: la commande créait du code C++. Du code C devrait faire l'affaire.
2002-07-30 10:33:02 -04:00
Sebastien Barre
f87057813d
FIX: la commande créait du code C++. Du code C devrait faire l'affaire.
2002-07-30 10:23:39 -04:00
Ken Martin
44a7cd55ff
removed all source lists from the system and made them vectors. Also appended _CMAKE_PATH to the end of the automatic cache entries for executables and libraries. Odds of all these changes working are slim but cmake builds and passes all its tests. VTK40 starts building
2002-06-27 15:57:09 -04:00
Ken Martin
38145ad5a4
modified create test source to create a vector
2002-06-19 12:52:16 -04:00
Bill Hoffman
e4dce08591
ENH: add the ability to process command line arguments in the test driver before the test driver gets them
2002-04-04 16:53:37 -05:00
Sebastien Barre
dbe20d8d3b
FIX: should compare to 0, not NULL
2002-03-29 16:25:39 -05:00
Bill Hoffman
7d76de4403
make sure ; expansion is done in all commands
2002-03-29 14:20:32 -05:00
Bill Hoffman
8b3b49a010
ENH: major change, the cmMakefile now contains a master list of cmSourceFile objects, the source lists reference the list via pointers, also you can now set properties on a file, like compile flags, abstract, etc.
2002-03-29 10:06:30 -05:00
Sebastien Barre
627ab62ce0
FIX: tolower is in <ctype.h> !, frenchy
2002-03-29 08:42:48 -05:00
Sebastien Barre
e081345595
ENH: perform case insensitive comparison on test names
2002-03-28 11:43:53 -05:00
Sebastien Barre
b63d6ee7dd
FIX: cmSourceFile::SetName was not called correctly for the test source files
2002-03-27 16:19:44 -05:00
Sebastien Barre
b0eb1031b7
ENH: small formatting enh
2002-03-27 15:52:52 -05:00
Sebastien Barre
0fd3ae7ba5
ENH: keep the name of the test as close to the source file (only the function name is cleaned up)
2002-03-26 18:06:36 -05:00