summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | gitattributes: prefer `eol=crlf` to `-crlf`Ben Boeckel2017-08-231-1/+1
|/ | | | | | The `crlf` attribute is deprecated in Git. This also changes the given files to be in the index using LF newlines, but they will be checked out with CRLF newlines due to the attribute.
* Xcode: Drop support for Xcode versions below 3Brad King2017-04-223-33/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-114-5/+5
| | | | | | | | | | | | | 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'
* testEncoding: use cmsys::ifstreamDaniel Pfeifer2017-03-291-2/+2
|
* testEncoding: include <cmsys/ConsoleBuf.hxx> on Windows onlyDaniel Pfeifer2017-03-291-0/+2
|
* execute_process: Add ENCODING option for Windows child process outputDāvis Mosāns2016-11-302-0/+52
| | | | Different applications can use different output encodings.
* iwyu: Fix more findingsDaniel Pfeifer2016-11-283-3/+15
|
* iwyu: Fix OSX specific issuesDaniel Pfeifer2016-11-221-1/+3
|
* Simplify CMake per-source license noticesBrad King2016-09-276-66/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* find_package: Optionally sort globbed directories in a meaningful orderPierluigi Taddei2016-09-152-0/+77
| | | | | | | | | | | | Add `CMAKE_FIND_PACKAGE_SORT_{ORDER,DIRECTION}` variables to specify sort order and direction. When multiple package with the same name have been found in the same location sorting option can be used to force a specific version to be loaded (e.g. libA_1.12.0 instead of libA_1.1.0). Currently sorting by NAME and by NATURAL order have been implemented. Natural ordering makes use of the `strverscmp(3)` ordering.
* Tests: Add test for our strverscmp implementationPierluigi Taddei2016-09-141-4/+68
| | | | | Cover typical examples and the ordering defined by the `strverscmp(3)` man page.
* Merge topic 'macro-parenthesis'Brad King2016-09-062-3/+3
|\ | | | | | | | | 1a9de803 surround macro arguments with parentheses
| * surround macro arguments with parenthesesDaniel Pfeifer2016-09-052-3/+3
| |
* | use CM_NULLPTRDaniel Pfeifer2016-09-052-2/+3
|/
* Tests/CMakeLib: include what you useDaniel Pfeifer2016-09-033-4/+7
|
* Tests/CMakeLib: use cmsys::ifstreamDaniel Pfeifer2016-09-032-10/+16
|
* Merge topic 'readability-named-parameter'Brad King2016-08-175-5/+5
|\ | | | | | | | | e7b842e1 Make sure unnused parameters are /*named*/
| * Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-165-5/+5
| |
* | fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-162-0/+11
|/
* Add missing braces around statements.Daniel Pfeifer2016-06-102-10/+17
| | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* PseudoMemcheck: revise style with clang-format.Daniel Pfeifer2016-06-101-14/+8
| | | | | | Rename memtester.cxx.in to memtester.cxx, run clang-format, then restore the original name. Fix the @_retval@ placeholder that was broken by clang-format.
* Merge topic 'remove-needless-copies'Brad King2016-05-271-1/+1
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.
| * Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-1/+1
| | | | | | | | | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.