summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Source: Replace C headers with C++ onesRose2021-11-021-1/+1
| | | | In applicable areas only, of course.
* bootstrap: Do not declare cmSystemTools functions that are not implementedBrad King2021-10-271-20/+4
| | | | Convert runtime error messages into compile-time errors.
* Merge topic 'warnings-cleanup'Brad King2021-10-271-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | 7e4e192ce2 Source: fix clang-tidy modernize-redundant-void-arg warning 8d671dd94c Source: fix more -Wmissing-prototypes warnings 1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static 319944b3d2 Source: fix some -Wunused-macros warnings 5257d9e71a Source: fix only -Wshorten-64-to-32 warning with explicit cast Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6648
| * Source: fix many -Wmissing-prototypes warnings by marking functions staticSean McBride2021-10-251-7/+7
| |
* | Source: Replace most calls to sprintf with snprintfSean McBride2021-10-251-6/+8
|/
* Move helpers functions from cmStringAlgorithms.h to cmValue.hMarc Chevrier2021-09-211-0/+1
| | | | | Helpers functions related to cmValue semantic are now part of cmValue.h header.
* cmSystemTools::VersionCompare: use std::string for argumentsMarc Chevrier2021-09-171-8/+20
|
* Xcode: add support for embedding dynamic librariesLucas SOLTIC2021-09-131-0/+6
|
* cmArchiveWrite: Check for construction errors on OpenBrad King2021-08-201-1/+4
| | | | | | Also update call sites to report the error. Issue: #19666
* cmELF: Include the ELF parsing code unconditionallyAlex Richardson2021-06-241-33/+3
| | | | | Now that the ELF definitions are provided on all platforms there is no need to keep the CMake_USE_ELF_PARSER option.
* cmELF: Fix check for TagMipsRldMapRelAlex Richardson2021-06-241-2/+1
| | | | | | | DT_MIPS_RLD_MAP_REL is a machine-speicific dynamic tag, so other architectures could re-use the value of 0x70000035 to mean something else. Before using DT_MIPS_RLD_MAP_REL, we have to check that the ELF file is actually has a e_machine of EM_MIPS.
* cmSystemTools: Support multiple binary formatsAlex Richardson2021-06-211-76/+139
| | | | | This prepares the code to handle both the ELF and XCOFF being enabled by trying to parse an ELF file first and if that fails falling back to XCOFF.
* cmSystemTools: Add SetRPath() methodKyle Edwards2021-06-041-0/+32
|
* Refactor: Break up logic in cmSystemTools::ChangeRPath()Kyle Edwards2021-06-041-70/+108
|
* cmMessenger: Pass title inside a metadata structureMarius Messerschmidt2021-05-191-1/+9
|
* cmSystemTools: Adopt RelativeIfUnder helperBrad King2021-05-171-0/+14
| | | | This returns a relative path if it does not start in `../`.
* cmSystemTools: Improve CreateLink and CreateSymlink error codesBrad King2021-05-071-3/+15
| | | | | | | | | | | In commit 7f89053953 (cmSystemTools: Return KWSys Status from CreateLink and CreateSymlink, 2021-04-15) we just took the `-err` from libuv and treated it as a POSIX error. This is accurate on POSIX, but on Windows does not match the POSIX error codes. Use `uv_fs_get_system_error` to get the actual system error code. This requires libuv 1.38 or higher. Require that for Windows, but fall back to the previous approach on POSIX.
* Merge topic 'nvhpc-warnings'Brad King2021-04-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | f881b4e4cc cmCPackDebGenerator: Remove unused local variable 5ad8862318 Source: Convince NVHPC that RAII variables are used 1898f9dd82 cmFileCommand: Remove unused local variable 6a003c6f35 cmSystemTools: Avoid unreachable code warning on NVHPC 16275c7f82 LexerParser: Suppress NVHPC warnings in generated code cefda16d35 LexerParser: Regenerate parsers with bison 3.7.5 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6049
| * cmSystemTools: Avoid unreachable code warning on NVHPCBrad King2021-04-281-1/+1
| |
* | MSYS: Add support for running under MSYS runtime environmentOrgad Shaneh2021-04-261-1/+5
|/ | | | Detect MSYS as CYGWIN, with the required adaptations.
* cmSystemTools: Return KWSys Status from CreateLink and CreateSymlinkBrad King2021-04-151-12/+12
|
* cmSystemTools: Simplify using KWSys StatusBrad King2021-04-141-31/+26
|
* Update CMake code using KWSys to account for Status return valuesBrad King2021-04-141-2/+2
| | | | | | KWSys as of 2021-04-14 changed the return type of `SystemTools` operations from `bool` to `Status`. Update our call sites. This may improve error reporting accuracy in a few places.
* Merge topic 'openbsd-defines'Brad King2021-04-141-3/+2
|\ | | | | | | | | | | | | 317a477283 OpenBSD: Fix system feature definitions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6000
| * OpenBSD: Fix system feature definitionsRafael Sadowski2021-04-141-3/+2
| | | | | | | | | | | | | | | | Since commit f034b0f663 (CMake compilation: do not use compiler extensions, 2020-03-14, v3.18.0-rc1~494^2), some sources explicitly enable needed system APIs on some platforms using definitions like `_POSIX_C_SOURCE` and `_XOPEN_SOURCE`. Drop the definitions for OpenBSD, which provides the POSIX APIs by default.
* | Refactor: Add cmSystemTools::GetSystemName()Kyle Edwards2021-03-151-0/+47
| | | | | | | | And use it for CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME.
* | cmSystemTools: add utilities to copy a file with error handlingBen Boeckel2021-03-091-0/+46
| |
* | cmSystemTools: Add RenameFile option to not replace destinationBrad King2021-03-041-8/+30
| |
* | cmSystemTools: Add RenameFile signature to capture the error messageBrad King2021-03-041-3/+40
|/
* AIX: Enable XCOFF editing to replace RPATH on installationBrad King2021-02-031-3/+110
| | | | Avoid relinking before installation.
* Rename CMAKE_USE_MACH_PARSER to CMake_USE_MACH_PARSERBrad King2021-02-031-2/+2
| | | | We use the `CMake_` prefix for options affecting CMake itself.
* Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSERBrad King2021-02-031-7/+7
| | | | We use the `CMake_` prefix for options affecting CMake itself.
* clang-tidy: fix `bugprone-reserved-identifier` warningsBen Boeckel2021-01-271-0/+2
|
* Makefile dependencies: ensure long paths are used on WindowsMarc Chevrier2021-01-091-0/+24
|
* cmSystemTools: Revert use of MOVEFILE_WRITE_THROUGH by RenameFile on WindowsBrad King2020-12-171-2/+1
| | | | | | | | | Revert commit d78c22aa64 (cmSystemTools: Improve RenameFile on Windows with MOVEFILE_WRITE_THROUGH, 2020-08-25, v3.19.0-rc1~243^2~3). Using this flag causes the operation to fail frequently in some environments. Drop it for now pending further investigation. Fixes: #21571
* CMake GUI: Add "CMake Reference Manual" help itemKyle Edwards2020-09-301-0/+16
| | | | And switch the ordering of "Help" and "About".
* Refactor: Modernize cmSystemTools::FindCMakeResources()Kyle Edwards2020-09-301-6/+6
| | | | Use cmStrCat(), cmStrLen(), and cmHasLiteralSuffix().
* libuv: Add support for building for QNX within CMakeElad Lahav2020-09-251-1/+2
|
* file(ARCHIVE_CREATE): Add option to control compression levelAsit Dhal2020-09-211-2/+3
| | | | Fixes: #21125
* cmSystemTools: Teach RenameFile to disable Windows Search IndexingRon W Moore2020-08-311-0/+59
| | | | | | | Create RAII class SaveRestoreFileAttributes to manage Windows Search Indexing. Turn it off temporarily while renaming a directory. Issue: #19580
* cmSystemTools: Teach RenameFile to try for longer on directoriesRon W Moore2020-08-311-1/+12
| | | | Issue: #19580
* cmSystemTools: Add more error handling to RenameFile on WindowsRon W Moore2020-08-311-4/+28
| | | | Issue: #19580
* cmSystemTools: Improve RenameFile on Windows with MOVEFILE_WRITE_THROUGHRon W Moore2020-08-311-1/+3
| | | | | | | Add this flag to tell `MoveFileExW` to flush the rename to disk before returning. Issue: #19580
* cmSystemTools: Factor out RenameFile wstring conversion on WindowsRon W Moore2020-08-311-8/+9
|
* cmSystemTools: Factor out MoveFileExW call in RenameFileBrad King2020-08-311-5/+13
|
* cmSystemTools: Define directory-specific Windows filesystem retry settingsBrad King2020-08-271-22/+67
| | | | Inspired-by: Ron W Moore <webbtrail@gmail.com>
* Clean a few string conversionsVitaly Stakhovsky2020-07-091-1/+1
|
* Merge topic 'restore-cwd-translation-map'Brad King2020-07-031-0/+6
|\ | | | | | | | | | | | | 85a945a607 Restore handling of build directory inside a symlinked path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4963
| * Restore handling of build directory inside a symlinked pathBrad King2020-07-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit dd8365b3f1 (Merge branch 'upstream-KWSys' into update-kwsys, 2020-04-06, v3.18.0-rc1~397^2) we imported KWSys commit `019afb6ea` (SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument, 2020-04-03). That caused `GetCurrentWorkingDirectory` to no longer send paths through the KWSys translation map and broke CMake's detection of the absolute path to a build directory containing a symbolic link. Add our own `cmSystemTools::GetCurrentWorkingDirectory` wrapper around the KWSys method in order to restore that mapping. Test-case-by: Ben Boeckel <ben.boeckel@kitware.com> Issue: #16228 Fixes: #20900
* | cmake: Tolerate nullptr from uv_default_loopBrad King2020-07-011-1/+3
|/ | | | | | | `uv_default_loop()` can return `nullptr` when running on a Linux kernel configured without `CONFIG_EVENTFD`. Fixes: #20899