summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* source: Pass small and trivially copyable types by valueDaniel Pfeifer2025-08-011-4/+3
|
* cmStrCat: use character literals where possibleBen Boeckel2025-05-151-1/+1
| | | | | Found and replaced using the `cmstrcat-to-char-literal` rule for `ast-grep`.
* cmStrCat: combine neighboring arguments where possibleBen Boeckel2025-05-151-7/+11
| | | | Found using the `cmstrcat-adjacent-literals` rule for `ast-grep`.
* Merge branch 'backport-macos-curl-backend' into macos-curl-backendBrad King2025-04-291-4/+2
|\
| * macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backendGregor Jasny2025-04-291-4/+2
| | | | | | | | | | | | | | | | | | In commit f2596dfa0e (macOS: Work around bug in system curl 8.{3,4,5} LibreSSL backend, 2024-07-16, v3.30.1~2^2) we tried to prefer `secure-transport` on problematic versions of curl. However, the `curl_global_sslset` setting must be applied before every `curl_global_init` call, not just the first one. Otherwise a second (or subsequent) download won't apply the work-around.
| * Merge topic 'macos-curl-user-agent' into release-3.30Brad King2024-08-151-1/+4
| |\ | | | | | | | | | | | | | | | | | | | | | 1a74f95656 file(DOWNLOAD): Fix User-Agent to use run-time curl version Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9726
* | | Source: Fix -Wformat warningsBrad King2025-04-241-1/+1
| | |
* | | file: Add more context to errors from file(DOWNLOAD)Martin Duffy2025-04-181-12/+15
| | |
* | | file(DOWNLOAD): Handle write errorsHanjiang Yu2025-03-261-8/+11
| | |
* | | Merge branch 'backport-3.31-file-MAKE_DIRECTORY-result-var'Brad King2025-03-131-1/+1
|\ \ \
| * | | file(MAKE_DIRECTORY): Clarify formatting of unexpected arguments errorBrad King2025-03-131-1/+1
| | | |
| * | | file(MAKE_DIRECTORY): Do not make directories for command keywordsBrad King2025-03-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 95323c90a1 (file(MAKE_DIRECTORY): Add optional RESULT keyword to capture failure., 2024-06-16, v3.31.0-rc1~414^2) we computed an updated range of arguments, that name directories to be created, before the `RESULT` keyword. However, we forgot to use it in the loop. Fixes: #26768
* | | | file(MAKE_DIRECTORY): Do not make directories for command keywordsBrad King2025-03-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 95323c90a1 (file(MAKE_DIRECTORY): Add optional RESULT keyword to capture failure., 2024-06-16, v3.31.0-rc1~414^2) we computed an updated range of arguments, that name directories to be created, before the `RESULT` keyword. However, we forgot to use it in the loop. Fixes: #26768
* | | | LICENSE: Replace references to Copyright.txt with LICENSE.rstKitware Robot2025-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` git grep -lz 'Copyright.txt or https://cmake.org/licensing ' | while IFS= read -r -d $'\0' f ; do sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / { s/Copyright.txt/LICENSE.rst/ }' "$f" ; done ```
* | | | Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * 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. Issue: #26123
* | | | CMP0009: Remove support for OLD behaviorBrad King2025-01-171-39/+1
| | | |
* | | | cmFileCommand.cxx: Optimize `cmStrCat()` callsAlex Turbov2024-11-191-16/+16
| | | |
* | | | cmPolicies: Remove now-unused REQUIRED_IF_USED and REQUIRED_ALWAYS statesBrad King2024-11-131-8/+0
| | | |
* | | | cmSystemTools: Implement GetRealPath on WindowsBrad King2024-11-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `cm::PathResolver`'s `RealPath` variant to normalize paths, look up their on-disk case, and resolve symlinks, but without resolving `subst` drives on Windows. Fixes: #17206
* | | | cmSystemTools: Add GetLogicalWorkingDirectoryBrad King2024-11-031-1/+1
| | | | | | | | | | | | | | | | Track the current working directory with symbolic links preserved.
* | | | cmake: Explicitly look up on-disk case of input paths on WindowsBrad King2024-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KWSys's `CollapseFullPath` no longer looks up the actual case on disk. Add the lookup explicitly where we need it: * `ToNormalizedPathOnDisk` * `file(REAL_PATH)` * `get_filename_component(... ABSOLUTE)` Fixes: #20214
* | | | cmWorkingDirectory: Unify error messagesDaniel Pfeifer2024-10-181-2/+1
|/ / /
* | | file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by defaultBrad King2024-09-261-0/+17
| | | | | | | | | | | | Fixes: #25701
* | | file(DOWNLOAD/UPLOAD): Verify TLS server certificate by defaultBrad King2024-09-241-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the connection fails in a way that might be a certificate error, and verification was enabled by the new default, mention environment variable `CMAKE_TLS_VERIFY` in the diagnostic to help users that were relying on the old behavior turn off server certificate verification in their environment. Fixes: #23608
* | | cmFileCommand: Clarify names and logic using optional<bool>Brad King2024-09-241-36/+36
| | |
* | | Merge topic 'file-REAL_PATH-warn-non-existing'Brad King2024-09-131-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 00c1161b01 file(REAL_PATH): Warn on non-existing paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9806
| * | | file(REAL_PATH): Warn on non-existing pathsAlex Overchenko2024-09-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The command is documented to work only for cases that the referenced path exists. Fixes: #26260
* | | | file(ARCHIVE_CREATE): add WORKING_DIRECTORY optionYuri Witte2024-09-111-1/+4
|/ / / | | | | | | | | | | | | Fixes: #25260 Issue: #21653
* | | Merge topic 'macos-curl-user-agent'Brad King2024-08-151-1/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 1a74f95656 file(DOWNLOAD): Fix User-Agent to use run-time curl version Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9726
| * | file(DOWNLOAD): Fix User-Agent to use run-time curl versionBrad King2024-08-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CMake is linked to a system-provided curl shared library, the version at run-time may not match the `LIBCURL_VERSION` at build time. Look up the run-time curl version to populate the User-Agent string. This is particularly important since commit d3cbee99e3 (macOS: Prefer building with system-provided curl, 2024-05-09, v3.30.0-rc1~130^2~1) switched to building our official binaries on macOS against the system provided curl shared library. Fixes: #26209
* | | Merge topic 'curl-http2'Brad King2024-08-151-2/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 7486f468fb curl: Avoid using HTTP/2 with curl 8.7.x due to bug in error codes Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9728
| * | curl: Avoid using HTTP/2 with curl 8.7.x due to bug in error codesBrad King2024-08-131-2/+2
| |/ | | | | | | | | | | | | | | | | curl 8.7.x has a bug in HTTP/2 error codes introduced by commit `0dc036225` (HTTP/2: write response directly, 2024-01-31, `curl-8_7_0~230`) and fixed by commit `5c59f9142` (http2 + ngtcp2: pass CURLcode errors from callbacks, 2024-04-18, `curl-8_8_0~181`). Fixes: #26200
* | Merge topic 'macos-curl-backend'Brad King2024-07-181-0/+2
|\ \ | |/ | | | | | | | | | | | | | | f2596dfa0e macOS: Work around bug in system curl 8.{3,4,5} LibreSSL backend Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !9663
| * macOS: Work around bug in system curl 8.{3,4,5} LibreSSL backendBrad King2024-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d3cbee99e3 (macOS: Prefer building with system-provided curl, 2024-05-09, v3.30.0-rc1~130^2~1) CMake uses the macOS-provided curl, which uses the LibreSSL backend by default. This exposes us to curl issue 12525, created and fixed by the following upstream curl commits: * commit `bec0c5bbf` (openssl: switch to modern init for LibreSSL 2.7.0+, 2023-08-07, `curl-8_3_0~201`) * commit `9f2d2290d` (openssl: re-match LibreSSL deinit with init, 2023-12-15, `curl-8_6_0~219`) Work around the bug by preferring the secure-transport backend by default on the problematic versions of curl.
* | file(MAKE_DIRECTORY): Add optional RESULT keyword to capture failure.Asit Dhal2024-06-241-9/+60
|/ | | | Fixes: #26041
* file: Add undocumented READ_MACHO subcommand on macOSRené Bertin2024-06-041-0/+2
| | | | | | Provide a way to parse the architectures of a Mach-O binary. Issue: #25952
* file(): TOUCH, TOUCH_NOCREATE and MAKE_DIRECTORY accept empty listsCraig Scott2024-05-311-8/+17
| | | | | | | | | Projects may be generating a list of files or directories to pass as arguments to file(TOUCH), file(TOUCH_NOCREATE), or file(MAKE_DIRECTORY). Those lists might end up being empty, so rather than requiring at least one item, allow an empty list. Fixes: #24897
* file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERIFY environment variableBrad King2024-03-301-0/+12
| | | | Issue: #23608
* file(DOWNLOAD|UPLOAD): Avoid unnecessary CMAKE_TLS_VERIFY variable lookupBrad King2024-03-301-4/+16
| | | | | If the `TLS_VERIFY` option is given explicitly, we do not need to check the variable.
* cmGlobCacheEntry: Add helper to carry CONFIGURE_DEPENDS glob cache argumentsArctic Lampyrid2024-03-191-4/+10
|
* file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION environment variableBrad King2024-02-281-0/+12
| | | | Issue: #25701
* file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variableBrad King2024-02-281-0/+12
| | | | Issue: #25701
* file(DOWNLOAD|UPLOAD): Add TLS_VERSION option for https connectionsBrad King2024-02-281-0/+44
| | | | | | | Add an option to specify the minimum allowed TLS version for https connections. Issue: #25701
* file: `STRINGS` + `REGEX` store match resultsCristian Le2024-01-091-0/+37
| | | | Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
* Merge topic 'cmFileCopier-error-loss'Brad King2023-12-051-6/+5
|\ | | | | | | | | | | | | | | | | | | 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
| * errors: avoid constructing a stream before getting the last errorBen Boeckel2023-12-021-6/+5
| | | | | | | | | | Constructing a stream may involve operations that change the global error state. Avoid the streams by using `cmStrCat` instead.
* | cmFileCommand: combine string literalsBen Boeckel2023-10-201-7/+9
|/
* Source: Remove redundant FileIsSymlink checksscivision2023-09-181-2/+1
| | | | | | Replace `FileExists || FileIsSymlink` with `PathExists`. The latter does not resolve symlinks, so this is OK for use with broken symlinks, files, and directories.
* file: Clarify CMake only drops RPATHS's it addedRobert Maynard2023-08-151-2/+4
|
* Merge topic 'file-GENERATE-arg-parsing'Brad King2023-08-081-1/+2
|\ | | | | | | | | | | | | | | 88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8694