summaryrefslogtreecommitdiff
path: root/Source/cmCreateTestSourceList.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmCreateTestSourceList: Port away from cmCommandRegina Pfeifer2019-09-121-22/+17
| | | | Ref: #19499
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-2/+2
| | | | | | 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.
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-6/+5
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* cmMakefile::ConfigureFile: Accept `std::string` parametersVitaly Stakhovsky2019-02-181-2/+1
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+4
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+1
|
* Separate compilation for commands included in cmBootstrapCommands1Daniel Pfeifer2016-10-211-0/+1
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use std::replace for replacing chars in strings.Daniel Pfeifer2016-05-241-3/+3
| | | | | | | | | | | 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"
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-73/+47
| | | | | | | | | | | | | 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.
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | 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.
* Avoid depending on CMAKE_ROOT cache entry internally (#16015)Brad King2016-03-161-2/+1
| | | | | | 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.
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-211-1/+1
| | | | Match names used in CMake code.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | 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.
* Run vim spellcheck on some filesYury G. Kudryashov2012-02-291-1/+1
|
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | 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.
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: Merging changes from branch CMake-SourceFile2-b between tagsBrad King2007-06-181-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* ENH: allow source file properties to chain to Directories and upKen Martin2006-12-131-3/+2
|
* ENH: make properties a bit more formal with documentation and chainingKen Martin2006-12-071-0/+3
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-16/+17
|
* STYLE: Fix some style issuesAndy Cedilnik2006-03-101-23/+29
|
* ENH: use GetRequiredDefinition instead of GetDefinition and crashBill Hoffman2004-08-111-1/+1
|
* BUG: When creating a test driver, do not remove the old file, so if nothing ↵Andy Cedilnik2004-05-271-11/+6
| | | | changes, it will not rebuild. Fixes Bug #885 - cmCreateTestSource overwrite file when running cmake
* ENH: make test driver more flexible by using a configured file instead of ↵Bill Hoffman2004-04-281-155/+28
| | | | generating all the code. fixes bug 28
* fix compiler warningKen Martin2003-12-151-1/+0
|
* ENH: null terminate at the end of the listBill Hoffman2003-07-031-1/+3
|
* undid change because other changes make it no longer neccesaryKen Martin2003-06-061-1/+1
|
* minor fixKen Martin2003-06-051-1/+1
|
* BUG: Generate 0 into test driver instead of NULL.Brad King2003-02-051-1/+1
|
* ENH: Moved ExpandListVariables out of individual commands. Argument ↵Brad King2002-12-111-6/+4
| | | | evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside.
* ENH: Improved implementation of MSVC debug hook to only add the hook if ↵Brad King2002-12-111-8/+9
| | | | DART_TEST_FROM_DART is set in the environment. This is better than always adding the hook and testing the environment from the callback.
* ENH: Generate code to setup MSVC debug library hook. The test driver ↵Brad King2002-12-111-9/+29
| | | | program will not display error dialogs if DART_TEST_FROM_DART is set in the environment.
* ENH: Added reference to Copyright.txt. Removed old reference to ITK ↵Brad King2002-10-231-3/+3
| | | | copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs.
* Rename variables to remove warningsAndy Cedilnik2002-10-171-4/+4
|
* removed some includesKen Martin2002-09-271-1/+1
|
* modified how source files store propertiesKen Martin2002-08-161-2/+2
|
* fixed some compiler warnings and leaksKen Martin2002-08-081-0/+2
|
* fixed some compiler warnings and leaksKen Martin2002-08-071-1/+1
|
* fixed some compiler warnings and leaksKen Martin2002-08-071-15/+4
|
* fixed support for C test programsKen Martin2002-07-311-4/+4
|
* FIX: <stdlib.h> is enough to get malloc()/free()Sebastien Barre2002-07-311-1/+1
|
* updated to handle extensionsKen Martin2002-07-301-9/+32
|
* FIX: la commande créait du code C++. Du code C devrait faire l'affaire.Sebastien Barre2002-07-301-4/+6
|
* FIX: la commande créait du code C++. Du code C devrait faire l'affaire.Sebastien Barre2002-07-301-8/+11
|
* removed all source lists from the system and made them vectors. Also ↵Ken Martin2002-06-271-1/+1
| | | | 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
* modified create test source to create a vectorKen Martin2002-06-191-4/+9
|