| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
a820877d03 errors: avoid constructing a stream before getting the last error
5cf7018af6 cmFileCopier: remember error statuses and get their strings
0639a32d3a cmFileTimes: return status codes from APIs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9023
|
| |
| |
| |
| |
| | |
Constructing a stream may involve operations that change the global
error state. Avoid the streams by using `cmStrCat` instead.
|
|/ |
|
|
|
|
|
|
| |
Replace `FileExists || FileIsSymlink` with `PathExists`.
The latter does not resolve symlinks, so this is OK for use
with broken symlinks, files, and directories.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8694
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactoring in commit bff468c988 (cmFileCommand: Use cm::optional for
keyword argument presence, 2022-06-30, v3.25.0-rc1~512^2) accidentally
broke the check that the input argument is either `INPUT` or `CONTENT`.
The check is supposed to fail when arguments are passed in the wrong
order. For example:
file(GENERATE OUTPUT ...
TARGET <target>
CONTENT <content>)
Prior to this fix, the input method would be CONTENT, but because the
first parsed keyword is not `CONTENT`, `inputIsContent` would be false.
The first parsed keyword isn't INPUT either, so we would not continue
into the error condition. CMake would then try to handle this as an
input file, when there isn't one, resulting in uninitialized memory
usage and segfaults or corruption later on.
Fixes: #25169
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously REAL_PATH would collapse paths before resolving any symlinks
so if `..` crossed a symlink the output from `REAL_PATH` would be wrong.
It looked like REAL_PATH did this by mistake since it was a side-effect
of ensuring we had an absolute path before resolving symlinks.
|
|/ |
|
|
|
|
| |
Fixes: #24605
|
| |
|
|
|
|
|
|
| |
Previously, MAKE_DIRECTORY would print `problem creating directory: {}`,
which was very unhelpful for debugging. Extend the message with the
OS error string.
|
|
|
|
|
|
|
|
| |
On Windows, a file may be inaccessible for a short time after it is
created. This occurs for various reasons, including indexing, antivirus
tools, and NTFS's asynchronous semantics. Add an `INPUT_MAY_BE_RECENT`
option to tell CMake that the input file may have been recently created
so that we can retry a few times to read it.
|
|
|
|
|
|
|
|
| |
This allows the Zstd compression-level to be set between 0-19. I've
adjusted some of the tests, and error messages to indicates the selected
algorithm, and min/max of its compression-level.
Fixes: #24160
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When `file(DOWNLOAD <url> EXPECTED_HASH <hash> LOG <logs>)` fails to
download the requested file, the hash check will also fail and make the
command exit without actually returning the curl logs as requested
by the `LOG` argument. Report the log before checking the hash.
Issue: #24093
|
|
|
|
| |
Offer variants that let the caller handle error messages.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
8fc822e13a file: Avoid strange istringstream crash in cmake.org binaries on Alpine Linux
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7698
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Somehow using `istringstream` and `operator >>` to parse an integer
crashes on Alpine Linux, at least when compiled with the settings we use
for the official `cmake.org` Linux binaries. Since commit fd0c285b12
(file: Fix types of the OFFSET and LIMIT arguments, 2022-01-04,
v3.23.0-rc1~133^2), this causes the `file(READ)` command to crash when
parsing its `LIMIT` or `OFFSET` argument. Parse the input string with
our dedicated helper to avoid the crash.
Fixes: #23872
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
file(DOWNLOAD STATUS) docs say the return list is of
length 2. However, when an already downloaded file
hash matches EXPECTED_HASH, the return message had
a semicolon that made the return list length 3.
Adjust the message to no longer contain the extra semicolon
and to more clearly describe the situation.
|
| | |
|
| |
| |
| |
| |
| | |
All clients have been converted to encoding this requirement in their
bindings.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Bindings to `std::string` require one value. Some clients have been
filtering `keywordsMissingValue` to support keywords that tolerate a
missing value. Offer them a type-safe way to achieve this instead.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously bindings to `std::vector<std::string>` required at least one
value. Some clients have been filtering `keywordsMissingValue` to
support keywords followed by empty lists. Instead, require clients to
specify whether a keyword's list can be empty as part of the binding
type.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
733801b57f file(TIMESTAMP): Interpret relative paths w.r.t. the source tree
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7440
|
| | |
| | |
| | |
| | | |
Fixes: #23610
|
| | | |
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In `cmArgumentParser`, a keyword bound to a `std::vector<std::string>`
value is reported in the list of keywords with missing values if the
keyword appears followed by an empty list. For cases where we want to
tolerate empty lists, clients need to filter out such keywords
themselves before producing an error message. This may be improved in
the future, but that is out of scope here.
In commit c7e1198a23 (file: Add ARCHIVE_{CREATE|EXTRACT} subcommands,
2020-03-13, v3.18.0-rc1~530^2), a pattern for filtering out keywords
that accept empty lists was copied from commit c998c8d560
(file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments,
2020-01-22, v3.17.0-rc1~111^2~1) incorrectly in two ways:
* Keywords were included in the filter that do not accept empty lists.
* Keywords were not in sorted order, breaking the filter operation.
Those two bugs mostly canceled each other out, and the resulting
behavior was to correctly report keywords with missing values.
However, the `MTIME` keyword was accidentally accepted with no value
by pretending the keyword was not given at all.
Simplify the logic by removing keywords from the filters that should not
be there. Leave `MTIME` in the filter for compatibility.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
e243b379ca cmFileCommand: Fix signature of CURLOPT_DEBUGFUNCTION callback
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7288
|
| | |
| | |
| | |
| | | |
Curl documents that the callback should return type `int`.
|
| | |
| | |
| | |
| | | |
`cmCryptoHash::New` already returns a `unique_ptr`.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to GNU tar add a --touch option to the tar extract command to
skip extracting the timestamps from the files in the archive
effectively touching them as if they were just created.
Issue: #22746
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
OFFSET argument cannot handle offsets bigger than INT_MAX because of
the atoi function, which is used to convert the argument string to integer.
Same applies for the LIMIT argument.
Use the steam based reading and 64-bit types to convert and store arguments
to avoid invalid values stored in the corresponding variables.
Fixes: #23076
|
|\
| |
| |
| |
| |
| |
| |
| | |
41bebbe50a file: Restore error capture in undocumented READ_ELF mode
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6853
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revise the error message added by commit 115ff6a347 (cmELF: Include the
ELF parsing code unconditionally, 2021-06-17, v3.22.0-rc1~557^2) to
honor the `CAPTURE_ERROR` option. This is needed by the call site in
`BundleUtilities` to suppress errors on non-ELF files.
Fixes: #23074
|
| | |
|
|/ |
|
|
|
|
|
| |
Print full list of unresolved dependencies and a phrase that indicates
what about the file is unresolved.
|
| |
|
| |
|
| |
|