summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
Commit message (Collapse)AuthorAgeFilesLines
* cmSystemTool: Let TrimWhitespace accept a cm::string_viewSebastian Holtermann2019-07-281-1/+1
|
* cmSystemTool: Let HelpFileName accept a cm::string_viewSebastian Holtermann2019-07-281-1/+1
|
* cmSystemTool: Let EscapeQuotes accept a cm::string_viewSebastian Holtermann2019-07-281-1/+1
|
* cmSystemTool: Let Expand(ed)ListArgument accept a cm::string_viewSebastian Holtermann2019-07-281-2/+2
|
* Merge topic 'remove_compiler_rpath'Kyle Edwards2019-07-261-0/+1
|\ | | | | | | | | | | | | | | 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-0/+1
| |
* | cmSystemTools: Make IsInternallyOn, IsON and IsOff cm::string_view basedSebastian Holtermann2019-07-241-9/+29
|/
* cmSystemTools: Remove cmSystemTools::FileFormat methodSebastian Holtermann2019-07-041-26/+0
|
* Merge topic 'string-tar'Brad King2019-05-301-3/+3
|\ | | | | | | | | | | | | 57cedb18c0 cmSystemTools: std::string parameters for tar functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3392
| * cmSystemTools: std::string parameters for tar functionsVitaly Stakhovsky2019-05-291-3/+3
| |
* | Merge topic 'tar-zstd-compression'Brad King2019-05-301-0/+1
|\ \ | |/ |/| | | | | | | | | 53cb1f2d04 cmake: Teach cmake -E tar command, Zstandard compression Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3357
| * cmake: Teach cmake -E tar command, Zstandard compressionBartosz Kosiorek2019-05-221-0/+1
| | | | | | | | Fixes #18657
* | cmake: tar: Allow selective extracting and listing of archivesBartosz Kosiorek2019-05-231-2/+4
| |
* | Merge topic 'string-error'Brad King2019-05-231-2/+0
|\ \ | | | | | | | | | | | | | | | | | | e884b1b693 cmSystemTools::Error(): remove const char* overload Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3360
| * | cmSystemTools::Error(): remove const char* overloadVitaly Stakhovsky2019-05-221-2/+0
| |/
* | cmSystemTools: Remove cmSystemToolsFileTime interfaceSebastian Holtermann2019-05-221-14/+0
|/ | | | | This removes the C style cmSystemToolsFileTime interface in cmSystemTools. It was replaced by the RAII based cmFileTimes class.
* cmSystemTools: Add ExpandedListArgument and ExpandedLists methodsSebastian Holtermann2019-05-131-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes ------- In `cmSystemTools` this - renames the method `ExpandList` to `ExpandLists` and makes it iterator based and adds the methods - `std::vector<std::string> ExpandedLists(InputIt first, InputIt last)` - `std::vector<std::string> ExpandedListArgument(const std::string& arg, bool emptyArgs)` Both return the `std::vector<std::string>` instead of taking a return vector reference like `cmSystemTools::ExpandLists` and `cmSystemTools::ExpandListArgument`. Motivation ---------- Since C++17 return value optimization is mandatory, so returning a `std:vector<std::string>` from a function should be (at least) as fast as passing a return vector reference to the function. The new methods can replace `cmSystemTools::ExpandLists` and `cmSystemTools::ExpandListArgument` in many cases, which leads to shorter and simpler syntax. E.g. the commonly used pattern ``` if (const char* value = X->GetProperty("A_KEY_STRING")) { std::vector<std::string> valuesList; cmSystemTools::ExpandListArgument(value, valuesList); for (std::string const& i : valuesList) { doSomething(i); } } ``` becomes ``` if (const char* value = X->GetProperty("A_KEY_STRING")) { for (std::string const& i : cmSystemTools::ExpandedListArgument(value)) { doSomething(i); } } ```
* Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+2
| | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219
* cmSystemTools: Remove unused message-related code, simplify logicAlex Turbov2019-04-271-3/+0
|
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-11/+11
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* Merge topic 'tar-improve-error-handling'Kyle Edwards2019-03-211-0/+9
|\ | | | | | | | | | | | | ea9a2c1759 cmake: tar: Parse 'cmake -E tar' arguments Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3081
| * cmake: tar: Parse 'cmake -E tar' argumentsBartosz Kosiorek2019-03-201-0/+9
| |
* | cmSystemTools: Drop unused CollapseCombinedPath methodBrad King2019-03-191-6/+0
|/ | | | | | | All call sites have been converted to `CollapseFullPath`, so the now-unused `CollapseCombinedPath` can be removed. Fixes: #19050
* cmSystemTools: More functions accept `std::string` paramsVitaly Stakhovsky2019-02-201-4/+4
|
* cmSystemTools: Remove redundant cmCopyFile() and Split()Vitaly Stakhovsky2019-02-151-7/+0
|
* cmSystemTools: More methods accept `std::string` paramsVitaly Stakhovsky2019-02-111-7/+9
|
* Merge topic 'message-stdstring'Brad King2019-02-081-6/+2
|\ | | | | | | | | | | | | 82edd98300 cmSystemTools: MessageCallback and Message() accept std::string argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2929
| * cmSystemTools: MessageCallback and Message() accept std::string argumentVitaly Stakhovsky2019-02-071-6/+2
| |
* | cmSystemTools::RunSingleCommand: Accept std::string argumentVitaly Stakhovsky2019-02-061-1/+1
|/
* cmSystemTools: Let `GetFileFormat` accept a `std::stding const&`Sebastian Holtermann2019-02-021-1/+1
| | | | | The `const char*` used formerly was converted to a `std::string` internally anyway.
* Merge topic 'std-string-callback'Brad King2019-01-311-1/+1
|\ | | | | | | | | | | | | | | 1180fc8780 OutputCallback: Accept std::string argument Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2891
| * OutputCallback: Accept std::string argumentRegina Pfeifer2019-01-301-1/+1
| |
* | Merge topic 'tidy-use-equals-delete'Brad King2019-01-301-1/+3
|\ \ | |/ |/| | | | | | | | | | | b05b778a2d clang-tidy: Use `= delete` Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2848
| * clang-tidy: Use `= delete`Regina Pfeifer2019-01-291-1/+3
| |
* | Merge topic 'functional-callbacks'Brad King2019-01-301-19/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c92db829b MessageCallback: Remove unused bool& argument bcee24aecc Use `std::function` for callbacks Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: vvs31415 <vstakhovsky@fastmail.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !2872
| * | MessageCallback: Remove unused bool& argumentRegina Pfeifer2019-01-291-3/+2
| | |
| * | Use `std::function` for callbacksRegina Pfeifer2019-01-291-17/+8
| |/
* | cmSystemTools: copy file member functions accept std::string paramsVitaly Stakhovsky2019-01-291-2/+2
|/ | | | | Cleaned up `c_str()`s. `cmSystemTools::CopyFileIfDifferent()` removed as redundant.
* cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-0/+4
|
* Merge topic 'renamefile-string'Brad King2019-01-251-1/+2
|\ | | | | | | | | | | | | 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/+2
| |
* | cmSystemTools::Error(): new overload accepting std::stringVitaly Stakhovsky2019-01-231-0/+1
|/
* Merge topic 'stdout-string'Brad King2019-01-221-4/+2
|\ | | | | | | | | | | | | 3132ea801c cmSystemTools: Stdout(),Stderr() accept std::string argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2829
| * cmSystemTools: Stdout(),Stderr() accept std::string argumentVitaly Stakhovsky2019-01-201-4/+2
| |
* | cmSystemTools: Silence CreateLink and CreateSymlink errorsTushar Maheshwari2019-01-161-2/+4
| | | | | | | | | | 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/+5
|/ | | | | | | | | | | | | | 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
* cmOutputConverter: Moved ForceToRelativePath to cmSystemBruno Manganelli2018-12-071-0/+8
|
* cmSystemTools: Add EncodeURL helperBrad King2018-11-281-0/+4
| | | | | | | Factor a URL encoding implementation out of CTest. Add an option to not escape slashes. Suggested-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* cmake: Add '-E create_symlink' support on WindowsJon Chronopoulos2018-09-181-0/+5
| | | | | | | | | | | | The allows `-E create_symlink` to work on Windows. It utilizes `uv_fs_symlink`. I am still unsure exactly which Windows platforms will work without requiring Administrator privileges or needing a user/group with the "Create Symbolic Links" User Rights. It does work with my Windows 10 Pro with Developer Mode turned on. In the test suite check that the symlink either worked or failed with a permissions error. Use recent changes in cmSystemTools::FileExists to check that a symlink is broken.
* cmSystemTools: Add IsOn(),IsOff() overloads accepting std::stringVitaly Stakhovsky2018-08-311-0/+2
|