| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Modify the original string instead of creating a new copy with substr() when it
is not used for anything else afterwards.
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
| |
This entirely avoids that one needs to call std::string::substr() for the
input.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
While at it avoid creating a new string.
|
| | |
|
| |
|
|
| |
Passing npos is legal and means "rest of the string".
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
ecc0086bfc cmake-gui: Fix use-after-free in Open-possible check
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4508
|
| | |
| |
| |
| |
| | |
Fix `QCMake::checkOpenPossible` to copy `toLocal8Bit().data()` before
its lifetime expires.
|
| | | |
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | | |
8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4494
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4494
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
bd89133543 cmState::GetCacheEntryValue: return cmProp
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4493
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
b915fec56e cmTarget: minor code improvements
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4483
|
| | |/ / / |
|
| |\ \ \ \
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |/
| |/| |
|
| | | | |
|
| | |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
af39d1b993 Swift: Fix quoting of library search paths with spaces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4469
|
| | |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
7a1cce210b CTest: Fix our internal CURL_DEBUGFUNCTION to conform to CURL docs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4459
|
| | |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
14732d3f30 macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSION
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4452
|
| | | | | | | |
|
| | |_|_|_|/
|/| | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
c7e1198a23 file: Add ARCHIVE_{CREATE|EXTRACT} subcommands
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4475
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes: #20443
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4482
|
| | | | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4471
|
| | | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
897af4c266 cmMakefileProfilingData: Fix ambiguous conversion to Json::Value
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4479
|
| | | | | | | | | |
|
| | |_|/ / / / /
|/| | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
73d52a862b cmPropertyDefinition: Construct directly in defined state
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4470
|