summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib
Commit message (Collapse)AuthorAgeFilesLines
* Source: Add cm::optionalKyle Edwards2019-08-232-0/+691
|
* Merge topic 'cmStringAlgorithms_ulong'Kyle Edwards2019-08-162-16/+35
|\ | | | | | | | | | | | | 935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3681
| * cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-102-16/+35
| | | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | cmStringAlgorithms: Add cmRemoveQuotesSebastian Holtermann2019-08-091-0/+23
|/ | | | | - Add `cmRemoveQuotes` function to cmStringAlgorithms - Remove unused removeQuotes inline functions
* Tests: testStringAlgorithms: Add cmTrimWhitespace, cmEscapeQuotes, cmTokenizeSebastian Holtermann2019-08-051-0/+37
| | | | | Extend the testStringAlgorithms test with tests for `cmTrimWhitespace`, `cmEscapeQuotes` and `cmTokenize`.
* Tests: Add CMakeLib.testStringAlgorithms testSebastian Holtermann2019-08-012-0/+135
|
* modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-141-1/+0
|
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-0/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* cmUVProcessChain: Add cmUVProcessChainKyle Edwards2019-05-073-0/+411
| | | | | | | | | This class is ultimately intended as a replacement for cmsys::Process. It spawns a series of processes using libuv, piping the output of each command into the next. Note: input support has not yet been implemented because write support has not yet been implemented on cmUVStreambuf.
* cmUVStreambuf: Add std::streambuf implementation for uv_stream_tKyle Edwards2019-04-252-1/+460
| | | | | This will allow std::istream/std::ostream-based interaction with processes spawned by libuv.
* cmUVHandlePtr: Add cm::uv_loop_ptrKyle Edwards2019-04-251-1/+49
|
* cmSystemTools: Fix StringToULong to reject negative numbersBrad King2019-04-111-0/+17
| | | | Fixes: #19161
* Merge topic 'argument-parser'Brad King2019-04-092-0/+149
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | b783e62533 cmExecuteProcessCommand: Port to cmArgumentParser 9bddb03f31 cmParseArgumentsCommand: Port to cmArgumentParser 45edf1ad66 Retire cmCommandArgumentsHelper f5acecaa6f cmExportCommand: Port to cmArgumentParser e6b6bb0618 cmInstallCommand: Port to cmArgumentParser 4336a29edd cmFileCommand: Port to cmArgumentParser 4359fe133b Introduce cmArgumentParser Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Leonid Pospelov <pospelovlm@yandex.ru> Merge-request: !3137
| * Introduce cmArgumentParserRegina Pfeifer2019-04-042-0/+149
| |
* | cmRST: Fix crash on empty markup blockBrad King2019-04-052-0/+8
|/
* testRange: Make sure tests can actually failRegina Pfeifer2019-03-201-1/+1
|
* cm_utf8: add an is_valid functionBen Boeckel2019-03-181-0/+78
|
* cm_utf8: reject codepoints above 0x10FFFFBen Boeckel2019-03-141-4/+2
| | | | | These are invalid because the Unicode standard says so (because UTF-16 as specified today cannot encode them).
* cm_utf8: reject UTF-16 surrogate half codepointsBen Boeckel2019-03-141-2/+2
|
* testUTF8: add more test casesBen Boeckel2019-03-141-6/+16
|
* testUTF8: comment why sequences are invalidBen Boeckel2019-03-141-2/+6
|
* cmRange: Add unit testsRegina Pfeifer2019-02-212-0/+46
|
* Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-152-11/+13
| | | | Suppress one in code generated by flex.
* IWYU: Update CMake code for IWYU built with Clang 6Brad King2019-01-151-1/+1
| | | | | IWYU now correctly requires `<utility>` for `std::move`. It also requires a container header when used via a range-based for loop.
* String: Add str_if_stable() as a const alternative to str()Brad King2018-12-121-0/+59
| | | | | | | | | | | | | | | | The `str()` method must be non-const because it may need to internally mutate the representation of the string in order to have an owned `std::string` instance holding the exact string (not a superstring). This is inconvenient in contexts where we can ensure that no mutation is needed to get a `std::string const&`. Add a `str_if_stable() const` method that returns `std::string const*` so we can return `nullptr` if if mutation would be necessary to get a `std::string const&`. Add supporting `is_stable() const` and `stabilize()` methods to check and enforce stable availability of `std::string const&`. These can be used to create `String const` instances from which we can still get a `std::string const&` via `*str_if_stable()` by maintaining the stability invariant at runtime.
* String: Add support for a ""_s string literal syntaxBrad King2018-12-121-2/+47
| | | | | Create a `static_string_view` type that binds only to the static storage of string literals. Teach `cm::String` to borrow from these implicitly.
* String: Add 'borrow' member to construct borrowing instancesBrad King2018-12-121-0/+32
| | | | | | This will allow creation of `cm::String` instances that borrow from non-owned storage. It is the caller's responsibility to ensure that no copy of the instance outlives the borrowed buffer.
* String: Add support for concatenation by operator+Brad King2018-12-121-0/+101
| | | | | | Use expression templates to collect the entire expression and pre-allocate a string with the final length before concatenating the pieces.
* String: Add a custom string typeBrad King2018-12-122-0/+1111
| | | | | | | | | | | | | | Create a `cm::String` type that holds a view of a string buffer and optionally shares ownership of the buffer. Instances can either borrow longer-lived storage (e.g. static storage of string literals) or internally own a `std::string` instance. In the latter case, share ownership with copies and substrings. Allocate a new internal string only on operations that require mutation. This will allow us to recover string sharing semantics that we used to get from C++98 std::string copy-on-write implementations. Such implementations are not allowed by C++11 so code our own in a custom string type instead.
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-3/+3
| | | | Enable the check in .clang-tidy and fix all warnings.
* Fix misc. typosluz.paz2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"` where the whitelist consists of ``` aci ans behaviour buil convertor dum earch ect emmited emmitted helpfull iff isnt ith lowercased mose nd nknown nto objext ot pathes pevents splitted substract superceded supercedes te tim todays uint upto whitespaces ```
* Help: Add new section for CPack generatorsKyle Edwards2018-06-212-0/+2
| | | | | | | | | | | | | | | | | | | | The documentation for CPack generators previously lived in their respective internal CMake modules. This setup was misleading, because it implied that you should include the modules in your own code, which is not the case. Moving the documentation into a separate section does a better job of hiding the internal modules, which are just an implementation detail. The generator documentation has also been modified to remove any references to the module name. The CPackIFW module is a special exception: since it has user-facing macros, the documentation for these macros has been kept in the module page, while all other documentation related to the IFW generator has been moved into the new section. To make it easier to find the new documentation, the old help pages for the CPack*.cmake modules have not been deleted, but have been replaced with a link to their respective help page in the new documentation section.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-013-13/+52
| | | | | | | | | | | | 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.
* cmRST: Parse inline links and inline literalsBrad King2018-05-072-0/+8
| | | | | Render links as the link text only. Render literals as themselves. This is closer to what the Sphinx text generator does.
* cmRST: Add support for 'envvar' cmake domain roleBrad King2018-05-042-0/+4
| | | | | This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain, 2018-04-19).
* CTest: Add options to control test process affinity to CPUsBrad King2018-03-052-0/+21
| | | | | | | | | | In commit v2.8.0~170 (ENH: Added ctest test options PROCESSORS and RUN_SERIAL, 2009-09-07) CTest learned to track the number of processors allocated to running tests in order to balance it against the desired level of parallelism. Extend this idea by introducing a new `PROCESSOR_AFFINITY` test property to ask that CTest run a test with the CPU affinity mask set. This will allow a set of tests that are running concurrently to use disjoint CPU resources.
* cmake: specify source file extensionsBen Boeckel2018-01-091-10/+11
|
* execute_process: Allow UTF-8 as a synonym for the UTF8 keywordCraig Scott2017-12-271-1/+1
| | | | | | | | UTF-8 is the proper naming according to the UTF-8 RFC and is also the name used for a similar keyword in the file() command. This commit brings (backward compatible) consistency to the keyword names and allows the standard UTF-8 name to be used with execute_process(). The old UTF8 keyword is still supported.
* cmUVHandlePtr: Add uv_process_ptrBrad King2017-11-301-0/+1
|
* cmUVHandlePtr: Add uv_timer_ptrBrad King2017-11-301-0/+1
|
* cmUVHandlePtr: Move to CMakeLib to make it available everywhereBrad King2017-11-302-0/+183
|
* Enable clang-tidy modernize-loop-convert lintBrad King2017-09-191-6/+3
| | | | | Fix remaining diagnostics by this lint and remove it from our list of disabled lints.
* Merge topic 'no-crlf-blobs'Brad King2017-08-3014-745/+745
|\ | | | | | | | | | | | | | | | | ebc91a44 Avoid CRLF newlines in Git repo blobs c69b4c8d bzip2: Drop unused .dsp files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !1211
| * Avoid CRLF newlines in Git repo blobsBrad King2017-08-3014-745/+745
| | | | | | | | | | | | | | | | In commit 8ed03baa76 (gitattributes: prefer `eol=crlf` to `-crlf`, 2017-08-23) we left a few CRLF blobs in the repository. Some Git versions get confused by text files with CRLF blobs. Convert them to LF blobs. Use the `eol=crlf` attribute to tell Git to use CRLF on checkout.
* | Merge topic 'cstyle-casts'Daniel Pfeifer2017-08-301-2/+3
|\ \ | |/ |/| | | | | | | | | 190e3825 Replace C-style casts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1176
| * Replace C-style castsDaniel Pfeifer2017-08-271-2/+3
| |
* | IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-262-2/+2
|/ | | | Also remove `#include "cmConfigure.h"` from most source files.
* Merge topic 'cxx11-nullptr'Brad King2017-08-252-3/+2
|\ | | | | | | | | | | | | 5962db43 Use C++11 nullptr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1175
| * Use C++11 nullptrDaniel Pfeifer2017-08-242-3/+2
| |