summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'update-kwsys'Brad King2018-06-251-4/+4
|\ | | | | | | | | | | | | | | | | b41b30f16e Update use of KWSys SystemTools::SplitString for new signature f2d97c1cdf Merge branch 'upstream-KWSys' into update-kwsys 6d7fdedde6 KWSys 2018-06-22 (49068d94) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2165
| * Update use of KWSys SystemTools::SplitString for new signatureBrad King2018-06-221-4/+4
| |
* | file: Drop error cases added by CMake 3.12.0-rc1 to avoid regressionsBrad King2018-06-221-17/+11
|/ | | | | | | | | Refactoring in commit v3.12.0-rc1~418^2~3 (Refactor HandleGlobCommand, 2018-02-13) introduced error diagnostics for argument combinations that were previously accepted. Restore acceptance to avoid regressing projects that used those combinations even if they do not make sense. Fixes: #18097
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-16/+21
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* file(WRITE): Report errors during write operationRuslan Baratov2018-05-161-0/+8
| | | | | We already report an error if the file cannot be opened for writing. Add another check to report an error if a write operation itself fails.
* file(INSTALL): Preserve file time when writing NTFS alternate streamYves Frederix2018-04-231-0/+12
| | | | | | | | | | When cross-compiling on a Windows host, we use a `:cmake_mode_t` NTFS alternate stream to store the file mode for use during packaging. Writing to this stream changes the file modification time, so save and restore the original modification time since we are not modifying the real file content. Fixes: #17922
* Add `CONFIGURE_DEPENDS` flag support to cmFileCommand::HandleGlobCommandShane Parris2018-03-291-0/+38
|
* file(GLOB): Ensure entire file list is sortedShane Parris2018-03-071-12/+7
|
* Refactor HandleGlobCommandShane Parris2018-02-281-71/+78
|
* Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commandsShane Parris2018-02-151-0/+38
|
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-23/+21
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-2/+2
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* Move file/dir permissions code to common file.Domen Vrankar2017-11-081-49/+3
|
* CMake: enable setting default dir creation permissionsDomen Vrankar2017-11-081-1/+22
| | | | | | | | | Introduces CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable which enables the user to specify the default permissions for directory creation. This setting is then used to auto set the permissions on directories which are implicitly created by install() and file(INSTALL) commands such as CMAKE_INSTALL_PREFIX directories.
* file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboptionShane Parris2017-10-181-0/+58
|
* Fix left-over occurrences of else-after-returnMatthias Maennich2017-09-281-3/+2
| | | | | | | | Fix issues diagnosed by clang-tidy [readability-else-after-return] These were mostly only showing up on OSX. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-12/+11
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Merge topic 'string-clear'Brad King2017-09-191-7/+7
|\ | | | | | | | | | | | | 5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
| * Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-7/+7
| |
* | Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-9/+9
|/ | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-28/+21
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Replace C-style castsDaniel Pfeifer2017-08-271-10/+12
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-21/+21
|
* CPackDeb: Enable the DEB generator on WindowsNils Gladitz2017-06-281-13/+28
| | | | | | | | While some features require external Unix tools the generator is mostly portable. By enabling it on Windows it can be used for cross platform packaging.
* Merge topic 'lint-function-args'Brad King2017-06-051-4/+4
|\ | | | | | | | | | | | | b1ec5dea Pass large types by const&, small types by value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !927
| * Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-4/+4
| |
* | Provide and use CM_FALLTHROUGHDaniel Pfeifer2017-06-031-0/+1
|/
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-1/+1
|
* Merge topic 'mingw-w64-compile'Brad King2017-05-161-0/+4
|\ | | | | | | | | | | | | | | 9557b403 cmFileCommand: Fix build on mingw-w64 845f5e3c bootstrap: fix build on mingw-w64 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !837
| * cmFileCommand: Fix build on mingw-w64Aleksey Chernov2017-05-151-0/+4
| | | | | | | | Include header needed for `CP_ACP`.
* | c++: prefer vectors over listsBen Boeckel2017-05-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | None of these usages of `std::list` were inserting or removing elements in the middle of the structure, so there were no benefits to using it. Other uses were related to C pointers being stable in a list of strings whereas in a vector of strings, small pointer optimizations could be moved and become invalid after a modification to the hosting vector. None of these uses modified the vector after handing out a C string to an external store.
* | clang-tidy: remove else after break and continueDaniel Pfeifer2017-04-211-2/+2
| |
* | file: Add COPY/INSTALL option for fixed layout relative to a directoryBrad King2017-04-131-1/+39
| | | | | | | | | | | | | | | | Add a `FILES_FROM_DIR` option to install a specific set of files specified relative to a given directory and preserve their layout in the destination. Currently we intend to use this internally to implement other things so we don't provide an `install()` porcelain or documentation yet.
* | file: Refactor COPY/INSTALL relative path handlingBrad King2017-04-131-10/+13
| | | | | | | | Delay conversion to absolute path until the last moment.
* | Use quotes for non-system includesDaniel Pfeifer2017-04-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* | Merge topic 'iwyu'Brad King2017-03-301-2/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 48cfb295 cmFortranParser: remove unnecessary typedef 90bb5f64 cmCommandArgumentParserHelper: remove unnecessary include ab5f4e81 cmFortranParserImpl: remove unnecessary include f8ed8bef testEncoding: use cmsys::ifstream 8647c6cd testEncoding: include <cmsys/ConsoleBuf.hxx> on Windows only 21a6ed49 cmFileCommand: add <cm_curl.h> include a2275bdd cmFileCommand: remove unnecessary friend declaration Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !626
| * | cmFileCommand: add <cm_curl.h> includeDaniel Pfeifer2017-03-291-0/+1
| | |
| * | cmFileCommand: remove unnecessary friend declarationDaniel Pfeifer2017-03-291-2/+0
| | |
* | | handle non-existing symlink creation locationsDomen Vrankar2017-03-281-0/+3
|/ /
* | Add self-sufficient wrapper for <sys/stat.h>Daniel Pfeifer2017-03-241-4/+1
| |
* | file: Add READ_ELF command to parse ELF binariesFlorian Apolloner2017-03-101-0/+69
|/ | | | | Leave it undocumented for now because we intend to use it internally and it cannot be made available everywhere.
* file: Fix crash on GLOB with no expressions after LIST_DIRECTORIESBrad King2017-01-161-1/+1
| | | | | | | | Since commit v3.3.0-rc1~318^2~1 (file: Teach GLOB to list directories optionally, 2015-03-17) using `LIST_DIRECTORIES` followed by no expression causes a crash. Fix the logic to avoid the crash. Fixes: #16565
* clang-tidy: apply readability-static-definition-in-anonymous-namespace fixesDaniel Pfeifer2016-12-121-9/+6
|
* clang-tidy: apply readability-redundant-string-init fixesDaniel Pfeifer2016-12-121-1/+1
|
* iwyu: Fix more findingsDaniel Pfeifer2016-11-281-15/+26
|
* file: Add support for SHA-3 algorithmsBrad King2016-11-101-1/+3
|
* Merge topic 'import-librhash'Brad King2016-11-101-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd8a57ae Add option to build CMake against a system librhash 71180fc8 FindLibRHash: Add module to find the librhash package 3216e94c Remove unused cm_sha2 infrastructure 5420278d Port hash computation to cmCryptoHash 9a596b33 cmCryptoHash: Re-implement in terms of librhash 47f91a61 cmCryptoHash: Avoid using subclasses at client sites d0ff3e70 librhash: Port to KWIML for ABI and integer type information 465a85fb librhash: Avoid signed left-shift overflow fc2cb74f librhash: Implement bswap_32 as a function even in strict C90 mode 0bd333bc librhash: Implement bswap_64 even in strict C90 mode 7189d62c librhash: Use __builtin_bswap{32,64} on Clang af7ebf8a librhash: Install COPYING file with CMake documentation bb01f20e librhash: Disable warnings to avoid changing 3rd party code 31bb727f librhash: Build the library within CMake 53048afa librhash: Remove source fragments not needed for CMake 5cb1b345 Merge branch 'upstream-librhash' into import-librhash ...
| * Port hash computation to cmCryptoHashBrad King2016-11-101-1/+2
| | | | | | | | | | Avoid using KWSys MD5 or `cm_sha2` and use the `cmCryptoHash` abstraction instead.
* | Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+1
|/
* Encoding: Remove option to use ANSI code page internallyClinton Stimpson2016-11-021-3/+3
| | | | | | The switch to use UTF-8 encoding has been defaulted to on for quite some time since commit v3.2.0-rc1~116^2 (Encoding: Switch to use UTF-8 internally by default on Windows, 2014-12-26).