summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Rename cmProp in cmValueMarc Chevrier2021-09-211-14/+14
|
* Use new AddCacheEntry signaturesMarc Chevrier2021-09-101-4/+4
|
* AddCacheEntry accept cmProp or std::stringMarc Chevrier2021-09-101-3/+3
|
* cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-3/+3
| | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-2/+2
|
* CMakePresets.json: Rework how --preset argument is handledKyle Edwards2020-10-261-0/+1
| | | | | | | | If a path argument with no -S or -B leads to a cache directory, use that directory as the binary directory. Otherwise, use the binary directory from the preset. Fixes: #21311
* cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-4/+1
|
* cmCacheManager: Cleanup CacheIterator interfaceTushar Maheshwari2020-04-181-143/+59
| | | | | | - Expose required functionality from CacheEntry. - Modify usage in cmState member functions. - Remove cmState access to CacheEntry members.
* Merge topic 'cleanup-endls-1'Brad King2020-03-271-47/+45
|\ | | | | | | | | | | | | 3fdd8db3aa Refactor: Avoid `std::endl` where it's not necessary (part 1) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4513
| * Refactor: Avoid `std::endl` where it's not necessary (part 1)Alex Turbov2020-03-261-47/+45
| | | | | | | | | | | | | | The `std::endl` manupulator, except inserting `\n` character, also performs `os.flush()`, which may leads to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning.
* | Merge topic 'string-prefix'Brad King2020-03-261-1/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | ec7928ef26 use _s to construct static string_views at several places 94de927cab VS10Generator: avoid many string allocations 8ca2504a4d use string_views to avoid memory allocations 761f1adcae check for a valid URL scheme before starting to do any splitting ef778d77e0 replace std::string::substr() with operations that do not allocate memory 77616f4681 pass cm::string_view to cmVisualStudioSlnParser::ParseTag() ada6a3226f use cm::string_view for language extension lookups 48adc29721 replace "std::string::find(x) == 0" with cmHasPrefix() ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4501
| * replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-1/+3
| |
* | cmCacheManager::GetProperty: return cmPropVitaly Stakhovsky2020-03-191-24/+19
|/
* cmPropertyMap: Introduce cmProp as return type for GetProperty() functionsVitaly Stakhovsky2020-03-131-1/+2
| | | | | | | Currently properties are usually stored internally as `std::string`. However, family of GetProperty() functions return them as `const char *` using `c_str()`. The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties more naturally.
* AppendProperty: convert value param to std::stringVitaly Stakhovsky2020-01-251-3/+3
|
* cmCacheManager: more members use std::stringVitaly Stakhovsky2020-01-061-9/+16
|
* cmState: more members will use std::stringVitaly Stakhovsky2020-01-021-1/+1
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+3
| | | | | 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: modernize-use-autoRegina Pfeifer2019-09-101-3/+3
| | | | | | 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.
* clang-tidy: modernize-return-braced-init-listRegina Pfeifer2019-09-061-1/+1
|
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+1
| | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Merge topic 'string-literal-append'Brad King2019-08-191-2/+1
|\ | | | | | | | | | | | | da26b3be89 avoid adding multiple consecutive string literals to std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3698
| * avoid adding multiple consecutive string literals to std::stringRolf Eike Beer2019-08-181-2/+1
| | | | | | | | While at it change some single character additions to be of type char.
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-2/+2
|/ | | | | | | | | 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-1/+2
|
* cmPropertyMap: Rename GetPropertyList method to GetKeysSebastian Holtermann2019-06-081-1/+1
|
* cmSystemTools::Error(): remove const char* overloadVitaly Stakhovsky2019-05-221-2/+1
|
* cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-4/+3
|
* Merge topic 'cmake-files-directory'Brad King2019-01-251-4/+3
|\ | | | | | | | | | | | | | | 3e867ed400 cmake: inlined files dir constant and removed it from cmake.h Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2655
| * cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-4/+3
| |
* | cmSystemTools::Error(): new overload accepting std::stringVitaly Stakhovsky2019-01-231-2/+2
|/
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-1/+2
| | | | Reduce the number of files relying on `cmake.h`.
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-9/+9
| | | | Enable the check in .clang-tidy and fix all warnings.
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-2/+1
|
* cmCacheManager::GetInitializedCacheValue(): Return as const std::string*Vitaly Stakhovsky2018-09-061-10/+12
| | | | Expose std::string type used internally instead of const char*
* Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-1/+1
| | | | Use the new IsOn(),IsOff() overloads.
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-1/+1
| | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | 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.
* Replace some uses of sprintf with std::to_stringjrp20142018-04-051-9/+9
|
* Refactor cmCacheManager::LoadCache to use ostringstreamShane Parris2018-02-281-8/+8
|
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-3/+3
| | | | | | | | | | * 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.
* cmCacheManager: Truncate values containing newlinesKyle Edwards2018-01-151-4/+70
| | | | Fixes #16098.
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-2/+2
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-14/+9
| | | | | | 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-5/+5
|
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-2/+1
|
* Access string npos without instancePavel Solodovnikov2017-06-011-2/+2
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | 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'