summaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* VS10Generator: avoid many string allocationsRolf Eike Beer2020-03-242-48/+36
|
* use string_views to avoid memory allocationsRolf Eike Beer2020-03-246-25/+37
|
* check for a valid URL scheme before starting to do any splittingRolf Eike Beer2020-03-231-6/+7
|
* replace std::string::substr() with operations that do not allocate memoryRolf Eike Beer2020-03-2310-20/+28
| | | | | Modify the original string instead of creating a new copy with substr() when it is not used for anything else afterwards.
* pass cm::string_view to cmVisualStudioSlnParser::ParseTag()Rolf Eike Beer2020-03-232-7/+8
|
* use cm::string_view for language extension lookupsRolf Eike Beer2020-03-234-12/+18
| | | | | | | Once the list of extensions is build the set is just a copy of the vector and not modified anymore. Use a string_view for the members of the set, which saves a small amount of memory. It also makes possible to use string_views as lookup keys, so the callers do not need to create copies for the extensions anymore.
* replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-2327-114/+129
|
* replace "substr(0, xx) ==" with cmHasPrefix()Rolf Eike Beer2020-03-239-24/+16
|
* allow cmCTest::CleanString() to skip input charactersRolf Eike Beer2020-03-232-4/+6
| | | | | This entirely avoids that one needs to call std::string::substr() for the input.
* CTest: avoid repeated string comparesRolf Eike Beer2020-03-232-132/+90
| | | | | | Only one key can match per iteration, avoid any further compares when one match was already found. While at it entirely avoid that the key and value strings are copied.
* Mumps coverage: directly pass std::string as argumentRolf Eike Beer2020-03-236-9/+9
|
* remove pointless return value from cmCTestTestHandler::CleanTestOutput()Rolf Eike Beer2020-03-232-4/+3
|
* PyCoverage: avoid repeated string splitting, especially for uncovered linesRolf Eike Beer2020-03-231-20/+17
|
* use std::string::rfind() instead of open coding itRolf Eike Beer2020-03-231-12/+8
| | | | While at it avoid creating a new string.
* CPackWIXGenerator: use cmStrCat for more partsRolf Eike Beer2020-03-231-5/+5
|
* remove needless check for std::string::substr()Rolf Eike Beer2020-03-231-2/+1
| | | | Passing npos is legal and means "rest of the string".
* cmcldeps: replace inefficient std::string::substr usageRolf Eike Beer2020-03-231-26/+24
|
* replace private startsWith() implementation with cmHasPrefix()Rolf Eike Beer2020-03-231-8/+4
|
* Merge topic 'cmake-gui-open-check'Brad King2020-03-231-1/+1
|\ | | | | | | | | | | | | ecc0086bfc cmake-gui: Fix use-after-free in Open-possible check Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4508
| * cmake-gui: Fix use-after-free in Open-possible checkFrancisco Facioni2020-03-201-1/+1
| | | | | | | | | | Fix `QCMake::checkOpenPossible` to copy `toLocal8Bit().data()` before its lifetime expires.
| * CMake 3.17.0v3.17.0Brad King2020-03-201-1/+1
| |
| * Merge topic 'export-repeat' into release-3.17Brad King2020-03-205-28/+33
| |\ | | | | | | | | | | | | | | | | | | 8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4494
* | | CMake Nightly Date StampKitware Robot2020-03-231-1/+1
| | |
* | | CMake Nightly Date StampKitware Robot2020-03-221-1/+1
| | |
* | | CMake Nightly Date StampKitware Robot2020-03-211-1/+1
| | |
* | | Merge topic 'export-repeat'Brad King2020-03-205-28/+33
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4494
| * | export: Fix use-after-free on multiple calls overwriting same FILEBrad King2020-03-195-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake 3.16 and below allow multiple `export()` calls with the same output file even without using `APPEND`. The implementation worked by accident by leaking memory. Refactoring in commit 5444a8095d (cmGlobalGenerator: modernize memrory managemenbt, 2019-12-29, v3.17.0-rc1~239^2) cleaned up that memory leak and converted it to a use-after-free instead. The problem is caused by using the `cmGlobalGenerator::BuildExportSets` map to own `cmExportBuildFileGenerator` instances. It can own only one instance per output FILE name at a time, so repeating use of the same file now frees the old `cmExportBuildFileGenerator` instance and leaves the pointer in the `cmMakefile::ExportBuildFileGenerators` vector dangling. Move ownership of the instances into `cmMakefile`'s vector since its entries are not replaced on a repeat output FILE. In future work we should introduce a policy to error out on this case. For now simply fix the use-after-free to restore CMake <= 3.16 behavior. Fixes: #20469
* | | CMake Nightly Date StampKitware Robot2020-03-201-1/+1
| | |
* | | Merge topic 'cmprop-state'Brad King2020-03-1915-76/+74
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | bd89133543 cmState::GetCacheEntryValue: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4493
| * | | cmState::GetCacheEntryValue: return cmPropVitaly Stakhovsky2020-03-1715-76/+74
| | | |
* | | | Merge topic 'target-improve'Brad King2020-03-195-30/+30
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b915fec56e cmTarget: minor code improvements Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4483
| * | | | cmTarget: minor code improvementsVitaly Stakhovsky2020-03-175-30/+30
| |/ / /
* | | | Merge topic 'trace-format-json-doc'Brad King2020-03-191-1/+2
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | 1994f950ff cmake: List valid values for --trace-format on the command line e39766d84a Help: Fix documentation of --trace-format parameter Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4500
| * | | cmake: List valid values for --trace-format on the command lineKyle Edwards2020-03-181-1/+2
| | |/ | |/|
| * | CMake 3.17.0-rc3v3.17.0-rc3Brad King2020-03-121-1/+1
| | |
| * | Merge topic 'swift-link-line-spaces' into release-3.17Brad King2020-03-121-3/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | af39d1b993 Swift: Fix quoting of library search paths with spaces Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4469
| * \ \ Merge topic 'ctest-curl-debugfunction' into release-3.17Brad King2020-03-122-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7a1cce210b CTest: Fix our internal CURL_DEBUGFUNCTION to conform to CURL docs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4459
| * \ \ \ Merge topic 'rename-macho-version-properties' into release-3.17Craig Scott2020-03-122-5/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14732d3f30 macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSION Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4452
* | | | | | CMake Nightly Date StampKitware Robot2020-03-191-1/+1
| | | | | |
* | | | | | CMake Nightly Date StampKitware Robot2020-03-181-1/+1
| |_|_|_|/ |/| | | |
* | | | | Merge topic 'file-archive'Brad King2020-03-171-0/+208
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c7e1198a23 file: Add ARCHIVE_{CREATE|EXTRACT} subcommands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4475
| * | | | | file: Add ARCHIVE_{CREATE|EXTRACT} subcommandsCristian Adam2020-03-161-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #20443
* | | | | | Merge topic 'property-computer'Brad King2020-03-173-19/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4482
| * | | | | | cmTargetPropertyComputer::GetProperty: return cmPropVitaly Stakhovsky2020-03-163-19/+23
| | | | | | |
* | | | | | | Merge topic 'prop_t'Brad King2020-03-1712-28/+35
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4471
| * | | | | | | cmPropertyMap: Introduce cmProp as return type for GetProperty() functionsVitaly Stakhovsky2020-03-1312-28/+35
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge topic 'mf_profiling_json'Brad King2020-03-171-7/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 897af4c266 cmMakefileProfilingData: Fix ambiguous conversion to Json::Value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4479
| * | | | | | | cmMakefileProfilingData: Fix ambiguous conversion to Json::ValueRaul Tambre2020-03-161-7/+8
| | | | | | | |
* | | | | | | | CMake Nightly Date StampKitware Robot2020-03-171-1/+1
| |_|/ / / / / |/| | | | | |
* | | | | | | Merge topic 'define-property'Brad King2020-03-168-39/+35
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 73d52a862b cmPropertyDefinition: Construct directly in defined state Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4470