summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * file: Change REMOVE to ignore empty namesBrad King2019-05-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously code like file(REMOVE_RECURSE "${accidentally_missing_variable}") treated the empty string as a relative path with respect to the current directory and removed its contents. Change this behavior to ignore the empty string with a warning instead. Normally such behavior changes are done with a policy, but in this case such code is likely a real bug in project code that can delete data. Fixes: #19274
* | Source: change parameters to std::stringVitaly Stakhovsky2019-05-191-2/+1
|/
* cmFileCommand: Port to cmArgumentParserRegina Pfeifer2019-04-041-81/+74
|
* cmFileCommand: Factor out cmFileCopier and cmFileInstallerBryon Bean2019-03-131-1080/+2
| | | | Split these classes out into their own sources.
* cmFileCommand: Refactor HandleCMakePathCommandArtur Ryt2019-02-261-24/+23
| | | | | | Make use of cmJoin and fresh cmRange::transform to reduce function complexity. Move conversion logic to named functions.
* cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
|
* Merge topic 'delete_copy_assign'Brad King2019-02-181-0/+3
|\ | | | | | | | | | | | | ae5e97a005 Delete some default constructors and assignment operators Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2968
| * Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+3
| | | | | | | | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* | cmSystemTools: Remove redundant cmCopyFile() and Split()Vitaly Stakhovsky2019-02-151-1/+1
|/
* Merge topic 'systools-stdstring2'Brad King2019-02-131-41/+43
|\ | | | | | | | | | | | | 080a79ca4a cmSystemTools: More methods accept `std::string` params Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2952
| * cmSystemTools: More methods accept `std::string` paramsVitaly Stakhovsky2019-02-111-41/+43
| |
* | cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-5/+5
|/
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-20/+16
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* Prefer front/back/data over dereferencing begin/rbegin iterArtur Ryt2019-02-061-3/+3
| | | | Changed for sequenced containers: vector, list, string and array
* Merge topic 'copyfile-stdstring'Brad King2019-01-301-2/+1
|\ | | | | | | | | | | | | c31b6e616d cmSystemTools: copy file member functions accept std::string params Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2877
| * cmSystemTools: copy file member functions accept std::string paramsVitaly Stakhovsky2019-01-291-2/+1
| | | | | | | | | | Cleaned up `c_str()`s. `cmSystemTools::CopyFileIfDifferent()` removed as redundant.
* | Merge topic 'tidy-use-equals-default'Brad King2019-01-291-2/+1
|\ \ | |/ |/| | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * cleanup: Prefer compiler provided special member functionsRegina Pfeifer2019-01-251-1/+0
| |
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-2/+2
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | Merge topic 'cmake-files-directory'Brad King2019-01-251-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 3e867ed400 cmake: inlined files dir constant and removed it from cmake.h Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2655
| * | cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-1/+1
| | |
* | | Merge topic 'renamefile-string'Brad King2019-01-251-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 9e5c13738b cmSystemTools::RenameFile: Accepts std::string args Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2842
| * | | cmSystemTools::RenameFile: Accepts std::string argsVitaly Stakhovsky2019-01-231-1/+1
| | |/ | |/|
* | | Merge topic 'revert-file-alt-httpauth'Brad King2019-01-251-8/+0
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 646eedcfcb Revert "file: Allow DOWNLOAD/UPLOAD using alternate authentication methods" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2858
| * | Revert "file: Allow DOWNLOAD/UPLOAD using alternate authentication methods"Brad King2019-01-241-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Revert commit 31301b46a7 (file: Allow DOWNLOAD/UPLOAD using alternate authentication methods, 2018-08-28, v3.13.0-rc1~155^2). It regressed support for password-protected redirects. Fixes: #18691
* | | cmSystemTools: Silence CreateLink and CreateSymlink errorsTushar Maheshwari2019-01-161-15/+13
| | | | | | | | | | | | | | | If provided, report errors to a std::string. This allows "silent" fallback to another flow, like COPY_ON_ERROR.
* | | cmFileCommand: Add CREATE_LINK subcommandTushar Maheshwari2019-01-161-0/+121
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | This brings the functionality of `cmake -E create_symlink` and more to scripts. The default behavior is to create hard links. The `SYMBOLIC` argument can be used to create symlinks instead. The `COPY_ON_ERROR` argument enables a fallback to copying the file in case the link fails. The `RESULT <var>` retrieves the error message generated by the system. It is set to "0" on success. Fixes: #16926
* | Merge topic 'semi-warnings'Brad King2019-01-161-6/+8
|\ \ | | | | | | | | | | | | | | | | | | b056bc3425 Fix most clang -Wextra-semi-stmt warnings in C++ files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2795
| * | Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-151-6/+8
| | | | | | | | | | | | Suppress one in code generated by flex.
* | | Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-17/+20
|/ / | | | | | | Reduce the number of files relying on `cmake.h`.