summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-8/+9
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* Merge topic 'warnings_skip_color'Brad King2019-08-261-9/+18
|\ | | | | | | | | | | | | 2079267959 ctest_build: ignore ANSI color Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3702
| * ctest_build: ignore ANSI colorZack Galbreath2019-08-221-9/+18
| | | | | | | | Ignore ANSI color when scraping logs for errors and warnings
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+1
|/ | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-4/+2
|
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-6/+0
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-2/+1
|
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-18/+18
|
* Modernize: Prefer .substr in place of .c_str() + intArtur Ryt2019-03-301-2/+2
| | | | | | A lot of temporary/local strings were created out of C-strings substr can utilize current string size, so in theory be a little more efficient.
* Rename cmFileTimeCache::FileTimeCompare to cmFileTimeCache::CompareSebastian Holtermann2019-03-181-1/+1
|
* Rename cmFileTimeComparison to cmFileTimeCacheSebastian Holtermann2019-03-181-4/+4
| | | | | The name `cmFileTimeCache` reflects the functionality of the class more appropriately.
* cmSystemTools: More functions accept `std::string` paramsVitaly Stakhovsky2019-02-201-5/+6
|
* Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+2
| | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* Prefer front/back/data over dereferencing begin/rbegin iterArtur Ryt2019-02-061-2/+2
| | | | Changed for sequenced containers: vector, list, string and array
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-1/+1
|\ | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-1/+1
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | cmFileTimeComparison: use std::string argumentsVitaly Stakhovsky2019-01-281-2/+1
|/
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-6/+6
|
* Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-151-7/+11
| | | | Suppress one in code generated by flex.
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-5/+2
|
* Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-1/+1
| | | | Use the new IsOn(),IsOff() overloads.
* CTest: Add error exception for sphinx-build WARNING messagesTim2018-08-301-0/+1
| | | | | | | | | | | | Sphinx-build warnings look like this: ../path/to/file.rst:105: WARNING: This is not an error. CTest detects these as errors by this regex: ([^ :]+):([0-9]+): ([^ \\t]) Add an exception as we already have for lower-case `: warning`.
* Merge topic 'cleanup-find-cstr'Brad King2018-08-091-1/+1
|\ | | | | | | | | | | | | 69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2271
| * Remove unnecessary c_str() in RegularExpression::find callsVitaly Stakhovsky2018-08-071-1/+1
| |
* | cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-2/+2
|/ | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-26/+35
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-1/+1
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Merge topic 'reduce-temporaries'Brad King2018-01-291-4/+5
|\ | | | | | | | | | | | | c85bb007 Reduce allocation of temporary values on heap. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1698
| * Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-4/+5
| | | | | | | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* | CTest: introduce cmDurationWouter Klouwen2018-01-231-2/+3
|/ | | | | | | | This commit introduces cmDuration as a typedef for std::chrono::duration<double, std::ratio<1>>. It is less verbose and provides for a point to put future common functionality for durations. No functional change intended.
* CTest: convert timeouts to std::chrono::durationWouter Klouwen2017-12-041-1/+1
| | | | | | | | | This commit continues the refactoring of CTest to adopt std::chrono. After the last sets of changes that introduced std::chrono::steady_clock and std::chrono::system_clock respectively, it makes sense to have all the timeouts be stored as std::chrono::duration. No functional change intended.
* IWYU: Add mappings for std::enable_if on chrono durationsBrad King2017-11-281-1/+0
| | | | | | | | IWYU incorrectly classifies this internal STL type as not internal, and suggests including `<type_traits>` for it. Work around the problem by mapping the offending names to a file that we always include. See include-what-you-use issue 434.
* CTest: adopt std::chrono::system_clockWouter Klouwen2017-11-171-5/+4
| | | | | | | | | | | | | | | | | | After the refactor to make CTest use std::chrono::steady_clock for the keeping of time for test duration, there are still references to cmSystemTools::GetTime() left. To further adopt std::chrono for time related activities, this commit changes those remaining references to std::chrono::system_clock::now() calls and alters the storage from either unsigned int or double to std::chrono::system_clock::time_point. For ease of conversion, a converter method is added to cmXMLWriter that converts from a std::chrono::system_clock::time_point to the number of seconds since the UN*X epoch as that is expected behaviour. This means no more casts as required. Functionally should be no difference as the system_clock is implemented in the same terms.
* CTest: use std::chrono::steady_clock for time keepingWouter Klouwen2017-11-141-6/+10
| | | | | | | | | | | | It was reported in issue #17345 that CTest does not use monotonic time to report test duration. Monotonic clocks are not affected by large NTP adjustments or things like daylight savings time. As CMake 3.10 requires C++11, which introduced std::chrono, this commit moves the time keeping in CTest from cmSystemTools::GetTime() to std::chrono::steady_clock. Fixes: #17345
* Improve several occurrences of vector::push_back in loopsMatthias Maennich2017-09-281-0/+1
| | | | | | | Fix issues diagnosed by clang-tidy by pre-allocating the vector capacity before the loop [performance-inefficient-vector-operation]. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-2/+2
|
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-12/+12
|
* Meta: modernize old-fashioned loops to range-based `for` (CTest).Pavel Solodovnikov2017-09-141-53/+38
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-11/+11
|
* Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variableBetsy McPhail2017-07-101-0/+1
| | | | | Use this variable to specify a list of labels that will be reported to CDash as subprojects.
* Access string npos without instancePavel Solodovnikov2017-06-011-2/+2
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-3/+3
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmCTestBuildHandler: Fix warning in FragmentCompare signatureBrad King2017-01-161-1/+1
| | | | | | | | | ``` warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings] ``` Reported-by: Sean McBride <sean@rogue-research.com>
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-1/+1
|
* Add Encoding option for RunChild, RunMakeCommand and RunProcessDāvis Mosāns2016-11-141-2/+2
|
* Windows: Encode child process output to internally-used encodingDāvis Mosāns2016-11-141-2/+17
| | | | | | Typically Windows applications (eg. MSVC compiler) use current console's codepage for output to pipes so we need to encode that to our internally-used encoding (`KWSYS_ENCODING_DEFAULT_CODEPAGE`).