summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'file-ARCHIVE-files-dirs' into release-3.18Brad King2020-07-011-35/+22
|\ | | | | | | | | | | | | bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4955
| * file(ARCHIVE*): Collapse FILES and DIRECTORY optionsCraig Scott2020-06-301-35/+22
| | | | | | | | | | | | | | | | The two options were concatenated internally for both ARCHIVE_CREATE and ARCHIVE_EXTRACT. The distinction between files and dirs was not meaningful. Therefore, replace them with PATHS or PATTERNS to more accurately describe the way the options are used. Fixes: #20884
* | Merge topic 'file-CONFIGURE-subdir' into release-3.18Brad King2020-06-301-1/+2
|\ \ | |/ |/| | | | | | | | | e5f5eeca2f file: Fix CONFIGURE output relative path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4951
| * file: Fix CONFIGURE output relative pathBrad King2020-06-291-1/+2
| | | | | | | | | | | | | | | | | | In commit a6fee09484 (file: Add CONFIGURE subcommand, 2020-03-06, v3.18.0-rc1~584^2) we accidentally treated relative path outputs with respect to the current working directory. Treat them with respect to the current binary directory instead. Fixes: #20885
* | file(ARCHIVE_CREATE): Rename TYPE option to COMPRESSIONCraig Scott2020-06-271-9/+9
|/ | | Fixes: #20883
* cmFileCommand: Log cmsys::Glob warningsDmitry Kalinkin2020-05-191-4/+9
|
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-2/+3
| | | | Fixes: #20666
* Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>Marc Chevrier2020-04-301-1/+1
|
* Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-2/+2
|
* file(UPLOAD): Add support for TLS_VERIFY and TLS_CAINFOHarry Mallon2020-04-081-6/+35
| | | | | * Improve and test err messages when TLS_VERIFY and TLS_CAINFO are not set in file(DOWNLOAD) and file(UPLOAD).
* file(UPLOAD): Add default ca_certsHarry Mallon2020-04-071-0/+7
| | | | | | | Default ca_certs were not added when using `UPLOAD` with built-in (non-system) cURL. Previously we only did this for `DOWNLOAD`. Fixes: #20551
* Simplify absolute path conversions using CollapseFullPath full signatureBrad King2020-03-241-5/+2
|
* file: Add ARCHIVE_{CREATE|EXTRACT} subcommandsCristian Adam2020-03-161-0/+208
| | | | Fixes: #20443
* file: Add CONFIGURE subcommandLeander Beernaert2020-03-091-0/+118
| | | | | | | | Extend the `file()` command with a new `CONFIGURE` subcommand that behaves the same as `string(CONFIGURE)` except that it writes the resulting output immediately to a file. Fixes: #20388
* file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list argumentsKyle Edwards2020-01-221-3/+15
| | | | | Also list all keywords that were missing values instead of only the first one.
* file(DOWNLOAD): Don't fail if given just a filename to write toJohnny Jazeix2020-01-151-1/+2
| | | | Fixes: #17969
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-6/+6
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-7/+8
| | | | | 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.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-2/+3
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* Refactor: Use cmStrCat to construct error stringsAsit Dhal2019-09-181-159/+102
| | | | | Replace string construction using std::stringstream with cmStrCat and cmWrap.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-4/+4
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-4/+4
| | | | | | 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: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-51/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-1/+3
|
* 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.
* | Merge topic 'cmCryptoHash_string_view'Brad King2019-08-191-2/+2
|\ \ | | | | | | | | | | | | | | | | | | f1c529c4fb cmCryptoHash: Accept cm::string_view input Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3697
| * | cmCryptoHash: Accept cm::string_view inputSebastian Holtermann2019-08-181-2/+2
| |/
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-3/+3
|/ | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Merge topic 'cmStringAlgorithms_ulong'Kyle Edwards2019-08-161-2/+1
|\ | | | | | | | | | | | | 935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3681
| * cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-2/+1
| | | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | Merge topic 'retry-directory-delete'Kyle Edwards2019-08-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 6bc77966ad Retry removing directories on Windows 5729580376 Use registry setting for removal retry count and delay Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3667
| * | Retry removing directories on WindowsKasper Laudrup2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | On Windows removing a directory can fail if other processes have a handle to it. This has been "solved" with a retry hack when moving directories, so use the same hack when removing directories.
* | | Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-6/+6
| |/ |/|
* | cmFileCommand: Use cmSubcommandTableRegina Pfeifer2019-08-061-116/+119
| |
* | cmFileCommand: turn into free functionRegina Pfeifer2019-08-061-2/+2
| |
* | cmFileCommand: put subcommands in unnamed namespaceDaniel Pfeifer2019-08-061-199/+190
| |
* | cmFileCommand: port to cmExecutionStatusDaniel Pfeifer2019-08-061-283/+306
|/
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Merge topic 'remove_compiler_rpath'Kyle Edwards2019-07-261-1/+6
|\ | | | | | | | | | | | | | | bd2793b6e9 Help: Add documentation for INSTALL_REMOVE_ENVIROMENT_RPATH f08dcbffec Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3544
| * Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH propertyJiang Yue2019-07-251-1/+6
| |
* | cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-29/+26
|/ | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* file: Add GET_RUNTIME_DEPENDENCIES modeKyle Edwards2019-06-101-0/+175
| | | | Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-8/+7
|
* Merge topic 'cmFileTimes'Brad King2019-05-231-14/+5
|\ | | | | | | | | | | | | | | | | 5b53cfda24 cmSystemTools: Remove cmSystemToolsFileTime interface 9c576a88d9 Use cmFileTimes instead of cmSystemToolsFileTime interface 4b45a5d5c7 cmFileTimes: New RAII based cmFileTimes class Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3358
| * Use cmFileTimes instead of cmSystemToolsFileTime interfaceSebastian Holtermann2019-05-221-14/+5
| |
* | Merge topic 'file-remove-no-empty'Craig Scott2019-05-221-0/+6
|\ \ | |/ |/| | | | | | | | | a1eb03569d file: Change REMOVE to ignore empty names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3349