ENH: Update KWSys to upstream master (2026-06-23, aa992d52)#6515
ENH: Update KWSys to upstream master (2026-06-23, aa992d52)#6515gdevenyi wants to merge 2 commits into
Conversation
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit aa992d526eaefcfa955f35e631bc026de9e6103f (master).
Upstream Shortlog
-----------------
AJIOB (6):
3b4b6642 Reduce `const char*` to `std::string` conversions
6e1f52b8 Replace length-1 string literals with char literals
0bccc663 SystemTools: Remove unnecessary string compare
33819fa9 SystemTools: Avoid out-of-bounds read if FileIsExecutable input is empty
4c87d5d3 Encoding: Reduce reallocations
4a1f73a3 FStream: Reduce `const char*` to `std::string` conversions
Aaron Liu (1):
dc6b6641 testSystemTools: apply root-check on AIX
Aditya Vidyadhar Kamath (1):
4cd115f2 testSystemTools: Fix preprocessor condition for AIX
Adriaan de Groot (1):
e65c5693 testSystemTools: apply root-check to more systems
Albert Astals Cid (3):
7d50c26d Delete some default constructors and assignment operators
95ced423 hashtable: delete assignment operator instead of poisoning it
6090d36b Glob: Use the default copy constructor and assignment operator
Alexey Edelev (1):
549d3d0b SystemTools: Fix type of GetLineFromStream
Ali Mohammad Pur (1):
1ea48581 ProcessUNIX: Fix kwsysProcessesSignalHandler() if !KWSYSPE_USE_SIGINFO
Artur Ryt (1):
01089e4c Prefer back/data over dereferencing rbegin/begin iterator
Ben Boeckel (48):
3e807fd6 cmake: specify source file extensions
ba270398 SystemToolsAppendComponents: move strings when building components
cfd0f1e6 JoinPath: push back as a character
6770cb3e GetFilenameName: optionally don't search for \ on non-Windows
22b189b0 ConvertToUnixSlashes: remove escaped space logic
342d69a4 ConvertToUnixSlashes: short-circuit on hasDoubleSlash
5dd87350 ConvertToUnixSlashes: remove pos1
3b46b7c0 ConvertToUnixSlashes: bail early on empty paths
55d1d6ab CollapseFullPath: reserve space for components
68807138 CollapseFullPath: prefer .empty() to .length() == 0
71a6de42 CollapseFullPath: refactor the overloads to share implementations
318550c7 CheckCollapsePath: add more test cases
a3caaeec SystemTools: faster relative path codepath
b5b294c1 SystemTools::Split: fix copy-pasta comments
ab0d44c9 SystemTools::Split: use str.find_first_of(char)
a5caf8a4 cmake: support an alias target
28db6989 cmake: add an option for building with PIC
30198dbc DynamicLoader: fix error reporting on Windows
cf6b5f69 DynamicLoader: use Encoding::ToWindowsExtendedPath for the libname
d17291ad DynamicLoader: support loading libraries using flags
40d9e482 DynamicLoader: support loading sibling libraries on Windows
971809c5 DynamicLoader: test the SearchBesideLibrary flag
efb006b9 DynamicLoader: include stdio.h for _snprintf
9e8e9ba0 DynamicLoader: avoid the min/max macros from windows.h
84bd7c9e SystemTools: support hiding the translation map
9afecb09 SystemTools: fix typo in junction functions
ccab3808 clang-tidy: address readability-isolate-declaration lints
87b57076 clang-tidy: address readability-braces-around-statements lints
13b45a41 clang-tidy: address readability-else-after-return lints
ebb48d58 clang-tidy: address google-readability-casting lint
09942f51 testSystemTools: add tests for SplitString
986519af SystemTools: handle splitting a string starting with the separator
83b20b65 clang-tidy: address `readability-braces-around-statements` lint
535633fa clang-tidy: address `readability-isolate-declaration` lint
de210648 clang-tidy: address `readability-else-after-return` lint
39fd4817 testProcess: fix another clang-tidy warning
f69c5cb7 Directory: return a bool literal on Windows
2a118b34 SystemTools: use nullptr in Windows-only code
7ee0dbee Directory: capture the error message
dd703ac6 SystemTools: make file copying mechanisms public
99ffa991 cmake: clear some configure checks when the deployment target changes
df91e5f1 EncodingC: use NULL for pointers
ab959cd2 SystemInformation: fix typo in comment
40bbf3fd Status: offer an `IsSuccess` method
a6a0bb15 Status: use the new IsSuccess method
4226d5e5 Status: detect and diagnose X11 symbol conflicts
46f47034 SharedForward: Drop this component of KWSys
72e677e9 kwsysPrivate.h: Remove unused build-tree copy
Benjamin Buch (1):
d49120dd SystemTools: Add CopyFileIfNewer
Björn Esser (2):
b4a2a03c testDynamicLoader: Use LIBDL_SO macro if defined.
b954dd54 testDynamicLoader: Use LIBC_SO if LIBDL_SO is not defined by glibc anymore.
Brad King (136):
7a4cca11 Process: Refactor test compile flag addition
90886a99 Process: Fix tests under ubsan
bfdbfe9b Avoid requiring CMake 3.4 string(APPEND)
1b09cf0d Configure: Add KWSYS_FALLTHROUGH macro for C++ code
7b6fa277 ConsoleBuf: Add explicit switch case fallthrough markup
e9557f37 RegularExpression: Fix regression in 'find' method
09724ac8 hashtable: Avoid use of std::unary_function
9995f700 hashtable: Drop when building inside CMake
38855ca1 Set CMP0042 explicitly with CMake 3.0 and above
6e190d9a Fix include directory usage requirement for build tree
6d4e9fde SystemInformation: Android has no getifaddrs prior to API 24
0a0974d0 SystemTools: Restore unconditional caching in GetActualCaseForPath
a241fd13 SystemTools: Remove caching from public GetActualCaseForPath
805d9a7c Terminal: Add xterm-kitty to VT100 color support whitelist
c7ef6c1b SystemInformation: Do not include unnecessary fenv.h
6b9c233c clang-format.bash: update to clang-format-6.0
b7a341cf Empty commit at end of history preceding clang-format-6.0 style transition
5d6f59fe SystemTools: Change SplitString return type to use std::string
aebe4597 XL: Restore suppression of infinite loop warning in process test
7a5e5af8 SystemTools: Revert "Fix FileIsSymlink with Windows data deduplication"
5d92e8d9 Require CMake 3.1 or higher for KWSys
6db3c607 Require C++11 or higher to compile KWSys
363bf5ab Configure: Drop Large File Support macro definitions
db462838 SystemTools: Revert "Use copyfile(3) to clone files on macOS"
92334e76 SystemTools: CopyFileAlways: avoid copying file over self
15896025 SystemTools: Use C++11 in SystemToolsAppendComponents
c6f8e24a SystemTools: Fix CollapseFullPath with relative base path
5ca03af6 SystemTools: Revert "Reduce scope of 'buf' variable in CollapseFullPath"
cdd52ce1 RegularExpression: Initialize RegularExpressionMatch arrays fully
b019deea RegularExpression: Suppress VS 2013 warning C4351
a5248df0 CTestCustom: Suppress PGI Community Edition compiler license warnings
2581cfd1 SystemTools: Update EnableMSVCDebugHook to simulate "Retry"
c2420a42 SystemTools: Revert "CopyFileIfDifferent: Ensure that source is a file"
313b2f7a SystemTools: Make SystemToolsStatic singleton private to implementation file
019afb6e SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument
c35a377f SystemTools: Refactor CollapseFullPath to call getcwd only when needed
e3989b18 SystemTools: Restore GetCurrentWorkingDirectory slash conversion on Windows
41700ca4 SystemTools: Fix FileIsExecutable on Windows
b8177b56 testProcess: Disable unreliable test case 7
e093a985 Glob: Append warning message only if destination is non-null
25775078 Glob: Do not warn if top-level directory does not exist
ce4941c9 IOStream: Drop this component of KWSys
49d04c2c hashtable: Drop this component of KWSys
a0bd892c SystemInformation: Use 'long long' unconditionally
441dd494 Drop unused checks for 'long long' and '__int64'
2b749749 Drop unused C type macros check
74daf33b Drop unused Borland and OpenWatcom preprocessor conditions
c4e8126a Drop unused CXX cstdio check
6e51fe76 FStream: Add std::fstream wrapper for in/out file streams
85e76a10 Status: Add class to hold an OS-specific status of a system operation
eec0add2 Directory: Return Status from Load
955e7c1e SystemTools: Return Status from RemoveFile and RemoveADirectory
c5a99e59 SystemTools: Return Status from GetPermissions and SetPermissions
fadfd7a0 SystemTools: Return Status from Touch
06216f0b SystemTools: Return Status from FileTimeCompare
ab198a22 SystemTools: Return Status from GetShortPath
2446b205 SystemTools: Return Status from MakeDirectory
6aec6af9 SystemTools: Return Status from ChangeDirectory
0664553b SystemTools: Return Status from copy operations
a95f61cf SystemTools: Return Status from symlink operations
6e59fd94 Process: Suppress NVHPC warning in FD_ZERO
5c6539ca Terminal: Revert "Simplify CLICOLOR_FORCE check"
8f3c4879 Status: Fix GetWindows return type
5d4c8b04 SystemInformation: Simplify demangle buffer management
025a4951 SystemTools: Add Windows app exec alias support to ReadSymlink
f5b3500f SystemTools: Simplify FileIsExecutable on Windows
bcddb31b SystemTools: Fix Windows app exec alias layout
929b6c6c Glob: Revert "Optimize directory/symlink checks on Windows"
4b552447 Directory: Replace FileData with methods accepting file index
259cdb6a SystemTools: Update SetPermissions test case to avoid 0 perms on POSIX
591c4efb Activate POSIX APIs even without compiler extensions
45f20b83 Fix XL/XLClang warning suppression under CMP0089 NEW behavior
257b1111 Configure with policies through CMake 3.22
b72169e5 Process: Suppress clang -Wshorten-64-to-32 diagnostic on macOS
30e10c87 SystemTools: Report with copy operation failures which path failed
6c66ba9e clang-format.bash: Use generic clang-format attribute
82ae3f28 clang-format.bash: update to clang-format-15
a61d0ad6 Empty commit at end of history preceding clang-format-15 style transition
3cb35bf3 CONTRIBUTING: Update documented clang-format version to 15
5df8c0a1 RegularExpression: Extend max paren groups from 10 to 32
bfa688b5 SystemTools: Drop optional FindProgramPath arguments
093d6e45 DynamicLoader: Update test to avoid using CMAKE_INTDIR
c3201073 String.hxx: Drop this component of KWSys
b4492d09 cmake: Drop use of legacy "Dart" module
51272e80 SystemTools: Avoid macOS copyfile semantic differences as root
199aa713 RegularExpression: Tell clang-analyzer that program memory is initialized
9f9ff427 SystemTools: Teach RemoveADirectory to handle non-readable directories
3c922475 Convert http URLs to https
beaf1ca1 ConsoleBuf: Fix test case when running under Windows Terminal
4feb470a SystemTools: Remove GetActualCaseForPath from CollapseFullPath
6e847d08 SystemInformation: Add missing EOF check when reading /proc/cpuinfo
741c9c96 SystemTools: Expose GetActualCaseForPathCached publicly
fdf4f2f8 SystemTools: Fix ReadSymlink for links to absolute paths on Windows
20b2c992 SystemTools: Remove unused global object
47dce1a3 SystemTools: Remove path translation map
30e9db2d SystemTools: Drop GetActualCaseForPathCached
5995fd7d SystemInformation: Ignore stderr from OS query tools
62ad438e Glob: Use case-insensitive matching on CYGWIN
a42b7759 clang-format.bash: update to clang-format-18
6da5c6ac Empty commit at end of history preceding clang-format-18 style transition
a234f2ff clang-format: Enforce "east const" qualifier placement
ac2b3378 Empty commit at end of history preceding clang-format "east const" transition
a298a4aa Process: Suppress PID conversion warning
8142980e Process: Revert "Add function to get parent PID"
6b6ab811 SystemTools: Revert "use CopyFile on Windows"
a3f10d75 Drop unused code for compatibility with CMake < 2.6
f555ff3a Require CMake 3.13 or higher, enable policies through 3.31
d68a5d3f SystemTools: Comment why ChangeDirectory does not use UNC for long paths
4336afc4 SystemTools: Remove redundant FindProgramPath function
54219234 SystemTools: Remove redundant FindProgram signatures
7a633bad SystemTools: Remove FindLibrary
cc3df2a3 Fix -Wswitch-default warnings in switch statements
713d53a4 ConsoleBuf: Remove this component of KWSys
0f8eeb90 Terminal: Remove this component of KWSys
3f589f94 Encoding: Drop support for building without std::wstring
7322a140 Process: Remove stray newline in GetExceptionString result
6b282151 SystemTools: Clarify UnPutEnv implementation comment with GNU runtime
99d779f3 SystemTools: Simplify UnPutEnv implementation with MSVC
523f9256 SystemTools: Implement HasEnv via GetEnvironmentVariableW on Windows
a446aa49 SystemTools: Improve PutEnv for empty values on Windows
0a58a55e SystemTools: Reduce allocation in GetEnv on Windows
abb5ca15 SystemTools: Fix CopyFileIfNewer error status when source is missing
001e388f Directory: Restore Load() error for missing directory on Windows
9551db0a SystemTools: Fix argument type in tolower/toupper calls
44f37675 Process: Fix process tree termination on NetBSD
ab828bd3 SystemTools: Avoid string copies in LowerCase and UpperCase
31fd473d String: Add locale-independent ASCII tolower and toupper functions
7ff358b8 String: Make case-insensitive comparisons locale-independent
cd306f61 SystemTools: Make case-conversion operations locale-independent
ed2a5afd Glob: Make case-insensitive comparison locale-independent
f48811e4 String: Add locale-independent ASCII classification functions
70d6b608 Make ASCII character classification locale-independent
f5716ce5 Encoding: Update comment describing ToWindowsExtendedPath
597af96a Encoding: Avoid repeat work in ToWindowsExtendedPath on paths < 512 chars
27b76f56 Encoding: Reduce allocations in ToWindowsExtendedPath
151d01f1 SystemTools: Drop unused CreateSymlink function
Brad Smith (1):
a13d90c2 SystemInformation: use HW_NCPUONLINE on OpenBSD and NetBSD
Bryon Bean (1):
8e428c18 Process: Add function to kill process (and children) with pid
Christoph Grüninger (3):
d3f3c38b Use prefix ++ operators for non-primitive types
9fd52415 Range-for loop with const reference
2310be95 Make variable more local
Christopher Chavez (1):
5a33629f ProcessUNIX.c: fix select(), FD_SETSIZE on macOS
Chuck Atkins (1):
4ca97fc6 SystemTools: Disable getpwnam for static linux builds
Clemens Wasser (13):
43ce7a20 SystemTools: Factor out FileIsSymlinkWithAttr helper
d078f9e6 Directory: Store FIND_DATA for files in Directory
7573b0fd Directory: Add Is{Directory,Symlink} to FileData
99c7831e Glob: Optimize directory/symlink checks on Windows
d4c5ed92 Glob: Optimize directory/symlink checks on Windows
ab7c8f6f SystemTools: Factor out RemoveTrailingSlashes
ca9646bd SystemTools: Optimize FileIsExecutable on Windows
1c156fd1 SystemTools: Better GetCasePathName caching
9e48ae84 SystemTools: Readd direct GetCasePathName caching
0cac8ee5 Directory: Use Win32 find file functions
550b5734 SystemTools: Use unordered_map for path caches
dd7d92d6 SystemTools: Implement GetEnv via GetEnvironmentVariableW on Win32
430818af SystemInformation: Optimize CPU clock speed detection on Windows
Clinton Stimpson (1):
e9d2b696 SystemTools: Cache only existing path names in GetActualCaseForPath
Cristian Adam (1):
993be8b6 Set CMake Policy CMP0069 to NEW within KWSys
Daniel Pfeifer (9):
68e1f35d SystemInformation: fix use of using
ac633613 CTestConfig: Remove unused variables
c5bb3c4e SystemInformation: Strip trailing whitespace from ModelName
80ad2c25 SystemInformation: Fix linking PowrProf on case-sensitive file systems
fd4c4235 Reference test executables by target name
0725a089 SystemInformation: Remove redundant attempt to use OSVERSIONINFO
136db938 SystemInformation: Remove unused variable bIsWindows64Bit
41d44dbe SystemInformation: Rewrite OSRelease and OSVersion on Windows
7d0a468c TestsCxx: Add an application manifest for Windows
David Bodnar (5):
116a4919 RegularExpression: Reduce scope of 'len' variable
31f5cdeb RegularExpression: Initialize private members on construction
6e36d909 SystemTools: Reduce scope of 'buf' variable in CollapseFullPath
a93bc28c SystemTools: Drop unnecessary .c_str()
6c3dfd25 CommandLineArguments: initialize internal class members directly
Deniz Bahadir (1):
8bc06cf8 Regex: Double the maximal allowed size for a regex (to 2^{16}-1)
Devin Nakamura (1):
2cbf13d2 Terminal: Add support for z/OS terminal
Dimitris Apostolou (1):
b387faf8 Process: Fix typos
Dmitry Kalinkin (3):
9a3f9799 Directory: implement error reporting
f33ef4e3 Glob: issue warnings on Directory errors
97f880e6 Directory: add extra tests involving errorMessage
Domen Vrankar (1):
9e0b4d1a SystemTools: set default MakeDirectory permissions mode
Dylan Fan (1):
e6cc4679 SystemInformation: Add Zhaoxin x86 processor
Dženan Zukić (1):
7079df74 SystemTools: Fix GetOperatingSystemNameAndVersion empty string return
E5ten (1):
f17f22a2 Terminal: Add alacritty and alacritty-direct to VT100 color support whitelist
Fan Jinke (1):
93352b24 SystemInformation: Add Hygon Dhyana Support
Georg Schwab (2):
fd2ec23d SystemTools: Implement FileIsSymlink using canonical reparse structure
3683e5ab SystemTools: Implement CreateSymlink and ReadSymlink on Windows
Gregor Jasny (3):
8e029751 SystemTools: Fix IsSubDirectory for subdirs of drive root
228c60b8 SystemTools: CopyFileAlways: try to create a cheap CoW clone first
7c71e879 SystemTools: Use copyfile(3) to clone files on macOS
Hanna Rusakovich (1):
64c27dfd SystemInformation: Fix total and available virtual memory for Windows
Hans Johnson (18):
7d7f3b2d Configure: Add KWSYS_NULLPTR macro for C++ code
81d1e737 STYLE: Use modern path naming
28b8e6c2 STYLE: Convert CMake-language commands to lower case
6ce3d69a DOC: Update documentation for modern add_subdirectory.
8a7fe7ac STYLE: Remove redundant void argument lists
1c3e193d COMP: Use nullptr instead of 0 or NULL
2a4c1252 STYLE: Replace integer literals which are cast to bool.
0fe7214d STYLE: Make prototype match definition names
3b30d0ff STYLE: Make prototype match definition names
691d5612 PERF: readability container size empty
7be4043f STYLE: Prefer c++11 'using' to 'typedef'
acc916ed COMP: Prefer const pointer when value does not change
4c7f64eb COMP: Prefer const member functions
d07092a0 STYLE: Use default member initialization
6d20e7c9 STYLE: Prefer = default to explicitly trivial implementations
91429382 PERF: emplace_back method results in potentially more efficient code
cc8fc323 STYLE: Use auto for variable type matches the type of the initializer
6621b069 STYLE: Use range-based loops from C++11
Hernan Martinez (1):
00629420 SystemInformation: Add support for Windows on ARM64
Isaiah Norton (1):
4f9fb9aa SystemTools: Fix Touch to avoid requiring file ownership
Jack Guo (1):
22216d56 SystemTools: Fix Touch() on broken symlink when create==false
Jessica Clarke (1):
ebfb5cdb SystemInformation: Change GetRealAddress to return a size_t
Jochem van Boxtel (1):
510b13b4 SystemTools: Add FileId class and GetFileId function
Joker-Van (1):
dfec20c9 SystemInformation: Add Zhaoxin x86 processor kh40000
Jon Chronopoulos (2):
55a29eba SystemTools: Allow FileExists on Windows to follow symlinks
38486236 SystemTools: do not special case a junction in RemoveFile
Juan Ramos (2):
ff14b4f5 SystemInformation: Fix find logic
a347a66b SystemInformation: Implement HasFPU on Apple processors
Julien Schueller (2):
c3acc96d CMake: Fix psapi lib name on case-sensitive fs
a1a261ac CMake: Fix psapi lib name on case-sensitive fs
Ken Martin (1):
43c6e2fd SystemInformation: Implement backtrace support on Windows
Kitware Robot (4):
828b6837 Revise C++ coding style using clang-format-6.0
f685d817 Revise C++ coding style using clang-format-15
7a19509c Revise C++ coding style using clang-format-18
7dec9555 Revise C++ coding style using clang-format with "east const"
Kyle Edwards (2):
5b8bf75b INSTALL: move namelink into development component
e5733515 Fix recent regression in installation of namelink
Laurent Malka (1):
6ccbfc12 SystemTools: Add a Join function
Lemures Lemniscati (5):
be39cd88 Glob: Use case-sensitive globbing on Cygwin
63dbb0ca SystemInformation: Improve CPU info lookup on Cygwin
4ef36a00 SystemTools: Remove Cygwin-specific file lookup optimization
9a6d6c54 Terminal: Avoid using Windows functions on Cygwin
4c61b968 SystemTools::FileIsFullPath: Do not accept Windows paths on Cygwin
Leon Richardt (1):
44eaaa6e Terminal: Add st-256color to VT100 color support whitelist
Leonid Pospelov (1):
6958dea7 SystemTools: use CopyFile on Windows
Marian Klymov (4):
d06fcab7 SystemTools: Check source directory in CopyADirectory
0b9f51a1 Remove redundant calls to c_str
361e54e3 Get rid of redundant string initialization
61501133 SystemInformation: Avoid use of dangling pointers on Solaris
Markus87 (1):
5f2dcc13 SystemTools: Fix FilesDiffer 32-bit signed integer overflow on Windows
Martin Duffy (2):
fda58f27 Process.h.in: Add missing undef for Process_KillPID
9727dfdb ProcessUNIX: Add function to get parent PID
Martin Storsjö (1):
fca5ad3a Process: Fix execute error handling re working dir on windows
Martin Willers (2):
bbf6cdef Terminal: Simplify CLICOLOR_FORCE check
f308fcfb Terminal: Disable color output when CLICOLOR is set to 0
Mathieu Westphal (2):
acee32bd Adding DecodeUrl and GetFilePathFromURI methods
e28d7282 DynamicLoader: Add RTLD_GLOBAL as a supported flag on linux
Matthew Woehlke (1):
488ae2ca SystemTools: Avoid thread-unsafe `localtime` function
Michael Hirsch (1):
f0223ad1 SystemInformation: correct function name spelling
Mike Lundy (1):
ee3223d7 SystemTools: fix clonefile optimization on macOS
Modestas Vainius (1):
162b3ed7 SystemInformation: Fix compilation on GNU/{kFreeBSD,Hurd}
Nick Begg (1):
2926bae9 SystemTools: Fix CloneFileContent copy-on-write on macOS / APFS
Nicolae Vartolomei (1):
d1536b02 macOS: Better approximation for AvailablePhysicalMemory
Nikita Nemkin (8):
4a126278 clang-format.bash: Preserve CRLF line endings on Windows
98452164 RegularExpression: Add an optional offset parameter to find()
0359bfbc RegularExpression: Fix match start/end values of unmatched groups
46fc21ef RegularExpression: Remove redundant overloads
d022423b RegularExpression: Add a method to query the number of capture groups
c8f5f4bf RegularExpression: Add an options parameter to find()
2ab910a3 SystemTools: Improve repeated slash handling in ConvertToUnixSlashes
22af8b25 SystemTools: Fix invalid memory access in ConvertToUnixSlashes
Orgad Shaneh (3):
17f4af9b SystemTools: Use octal base for error messages in permission test
f00dd83e SystemTools: Avoid unnecessary assumption of working directory in test case
5b941f33 SystemTools: Adapt permissions test to MSYS
Paul Smith (1):
dfd0521e Terminal: Support GNU make's TTY notification environment variable
Peter Kokot (5):
967b2120 Remove legacy unused IMMEDIATE CMake keyword
08b9f90d Use lower case style for CMake commands
03be1fd7 Replace CMAKE_COMPILER_IS_GNUCXX with CMAKE_CXX_COMPILER_ID
1a2e54be CTest: Replace deprecated TEST_INCLUDE_FILE with TEST_INCLUDE_FILES
45bb9a19 CMake: Remove unused CheckTypeSize module
Peter Wu (1):
898dc6b9 SystemTools: Fix GetLineFromStream to avoid libc++ bug on OS X 10.7
Robert Maynard (2):
4b537c59 Tests: Handle that root users on linux can always write to files
29096513 Process: Prefer normative terms to express subprocess failures
Roger Leigh (1):
bdd39241 Process: On Windows do not open stdin file with write permission
Rolf Eike Beer (11):
b747462d CMake: drop needless x${VAR} tricks
1ed70242 tests: verify SystemTools::CopyFileIfDifferent()
f73d1b4f SystemTools: factor out "dest is directory" case from CopyFileIfDifferent()
25b61c12 Directory: make it move constructible and assignable
8b1a29e1 optimize SystemToolsParseRegistryKey()
420c3b04 call std::string::clear() instead of assigning ""
bc9a4256 avoid inefficient usage of std::string::substr()
e3c051e2 SystemTools: create directories with the right permissions on Un*x
0085096e avoid std::string::find() to check for prefix
c55e5dc3 CTestConfig: allow nightly build submission using https
7b0f5c20 SystemInformation: improve CPU counting on non-standard architectures
Saleem Abdulrasool (1):
0969597d SystemTools: add a clonefile optimization on macOS
Sankhesh Jhaveri (1):
20c458d0 Set CMP0022 policy to new to provide link interface definitions
Sean McBride (28):
c6829e4d Fixed a few comments, mostly regarding base 2 vs base 10 sizes
f44cbf93 Fixed clang -Wextra-semi-stmt warnings
4de1241f Fixed -Wextra-semi-stmt warning
30de8e17 Fixed -Wsign-conversion warnings by adding casts
750da75a Fixed 64 to 32 bit truncation warning by casting
419aaa35 Fixed -Wunused-macros warnings
46c55893 Replaced several 0, NULL, and KWSYS_NULLPTR with nullptr
c58d4b47 SystemTools: On Windows, strip 'e' from Fopen mode
cb541c31 Auto-fixed various clang-tidy warnings
2c179921 Applied clang-tidy modernize-deprecated-headers
775296c8 Applied clang-tidy bugprone-suspicious-string-compare fixes
a19f0ac6 Fixed clang -Wstrict-prototypes warning
eb6820b6 Glob: Explicitly delete copy construction and assignment
45e42f63 SystemInformation: Improve ParseSysCtl error checking
3ba8a6de Glob: Change deleted ctor and operator= from private to public
f9e45083 CTestConfig: Always set CTEST_DROP_METHOD to https
15effd64 MD5: Fix Clang 13 Wnull-pointer-subtraction warning
704a63d4 Replace sprintf with snprintf
f9f6d67b Replace non-standard _snprintf with standard snprintf
f771c009 Fix -Wunused-macros warning by defining under same conditions as usage
f3d4b12b Fix Wmissing-prototypes warnings by making functions static
6f4a1826 Fix Wmissing-variable-declarations by declaring variable in a header
31d25023 Fix all Wold-style-cast warnings
0f44b620 Fix Wreserved-id-macro warning by removing double underscore
44718539 Fix for extraneous semi-colon warning
d6c6fd82 testDirectory: Rename functions to fix -Wreserved-identifier warnings
3489e4a2 Encoding: Reformulate to avoid unsigned int overflow
e180697f SystemTools: Add Strnucmp() API, similar to POSIX strncasecmp()
Sebastian Holtermann (22):
4d1e8738 RegularExpression: Make compile() reentrant (thread safe)
64f80068 RegularExpression: Make find() reentrant (thread safe)
bbc94ba8 RegularExpression: Remove unused code
cff58f07 RegularExpression: New RegularExpressionMatch class
6fed6364 SystemTools: Add SystemToolsStatic class skeleton
a8195f76 SystemTools: Move SystemTools::Cyg2Win32Map to SystemToolsStatic
7c273c83 SystemTools: Move SystemTools::EnvMap to SystemToolsStatic
706919be SystemTools: Move SystemTools::PathCaseMap to SystemToolsStatic
67eb2674 SystemTools: Move SystemTools::TranslationMap to SystemToolsStatic
9e32eecd SystemTools: Move private type definitions to SystemToolsStatic
d9db985f SystemTools: Move private GetEnvImpl method to SystemToolsStatic
a1271fea SystemTools: Move private FindName method to SystemToolsStatic
7512ab8c SystemTools: Move private FindIsFullPath method to SystemToolsStatic class
8b58389c SystemTools: Move private ReplaceString method to SystemToolsStatic class
00a3a436 SystemTools: Update buffered env value string only on a change
d6235796 SystemTools: Optimize iterator lifetime in JoinPath
9992f69b SystemTools: Optimize range loop in FindName method
8c9ca162 SystemTools: Optimize range loop in FindProgram method
c7e3ab12 SystemTools: Optimize range loop in FindProgram method
ac8d2033 SystemTools: Optimize range loop in FindLibrary method
815cc593 SystemTools: Optimize range loop in FindProgramPath method
5d8af0d6 SystemTools: Optimize range loop in RelativePath method
Sebastian Lipponer (2):
573713fa SystemTools: CopyFileIfDifferent: Ensure that source is a file
ea77593a SystemTools: CopyFileIfDifferent: Fix endless recursion
Taylor Braun-Jones (1):
3f35954d SystemTools: Add TextFilesDiffer method
Timo Röhling (1):
9119f1a1 SystemInformation: Tolerate empty /proc/cpuinfo
Tobias Kloss (2):
ef373416 SystemTools: Fix FileIsSymlink with Windows data deduplication
aa1f7f7c SystemTools: Fix FileIsSymlink with Windows data deduplication
Todd Martin (3):
569a1aed Encoding: Add ToWindowsExtendedPath support for wide string
0492cad3 SystemTools: Remove redundant ToWindowsExtendedPath calls
680ab6d2 FStream: Expose is_open publicly
Tom Stellard (1):
e1aeb61e SystemInformation: Fix GetNumberOfLogicalCPU on s390x
Tyler Yankee (5):
eb5314d9 Fix -Wcast-function-type on Windows
a8dee64d Process: Fix -Wsign-compare on Windows
95af663a Remove unused values
26adf4f1 testProcess: Suppress -Warray-bounds
9fb3efd7 SystemInformation: Fix -Wmissing-field-initializers
Vladimir Menshakov (1):
66724af8 SystemTools: Teach FindProgram to find non-readable programs
Volo Zyko (1):
9f6cd407 SystemTools: Fix removing of soft links to directories on Windows.
Wouter Klouwen (1):
8e9970fb SystemInformation: support BSD platforms for GetProcessId
Xeonacid (1):
2f654745 SystemInformation: Let NumberOf{Physical,Logical}CPU respect each other
Yuriy O'Donnell (1):
29f31d17 SystemTools: Add Windows app exec alias support to FileExists()
Zsolt Parragi (1):
887b1da5 Fixing issues when building with clang 8.0 on Windows
leha-bot (1):
1079929c Status: Fix encoding of error strings on Windows
luz.paz (3):
4b67f965 Remove superfluous double whitespace in appropriate places
94484960 Source typo fix s/[Pp]athes/[Pp]aths/
0e14a1a6 Misc. typos and whitespace fixes
luzpaz (1):
9a1d5901 Fix trivial typos in text
scivision (12):
e76a8438 Remove try_compile logging in favor of CMake>=3.26 configure log
12825be6 lint: use foreach(... IN {ITEMS,LISTS} ...)
f10cb6ad lint: use modern add_test(NAME ... COMMAND ...)
ebb95153 lint: set_property(TEST
f26b1b39 SystemInformation: use std::cerr like rest of KWSys
3c403fa9 SystemInformation: Replace C-style cast with reinterpret_cast
7f4459d5 Comeau: Remove undocumented support for this compiler
6624edf2 SystemTools:FileIs{Directory,Executable,FIFO}: refactor for simplicity
5f4012c6 Don't compare to nullptr
3f14fce6 Process: Replace 0 with NULL in pointer arguments to GetFullPathNameW
210cea0a SystemTools: Replace unused argument to GetFullPathNameW with nullptr
f5e82d63 SystemTools: Replace malloc() with std::string
ulatekh (1):
4ef5b106 SystemTools: Ensure Windows Vista APIs are available before using them
Đoàn Trần Công Danh (1):
4e69b791 SystemInformation: Add option to explicitly avoid using execinfo
Change-Id: Idc65f112dbc265eefd523c296060a15367f9d2b9
* upstream-KWSys: KWSys 2026-06-23 (aa992d52) Change-Id: I20f5539426ba8d46b2e35e5f341204bd76875061
|
| Filename | Overview |
|---|---|
| Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt | Major upstream resync: removes hash_* headers (breaks 17+ ITK files), drops Terminal/IOStream/ConsoleBuf/SharedForward, adds Status component, bumps cmake_minimum_required from 2.6.3 to 3.13 (conflicts with ITK's 3.5 floor). |
| Modules/ThirdParty/KWSys/src/KWSys/hash_map.hxx.in | Deleted — file no longer exists upstream. Multiple ITK public headers still include the generated itksys/hash_map.hxx, causing build failures. |
| Modules/ThirdParty/KWSys/src/KWSys/hash_set.hxx.in | Deleted — file no longer exists upstream. ITK modules including itksys/hash_set.hxx will fail to compile. |
| Modules/ThirdParty/KWSys/src/KWSys/Status.hxx.in | New addition: a clean cross-platform OS status class wrapping POSIX errno and Win32 GetLastError, with an X11 macro collision guard. Looks correct. |
| Modules/ThirdParty/KWSys/src/KWSys/Status.cxx | New addition: implements POSIX_errno(), Windows_GetLastError(), and GetString(). Windows path passes message through Encoding::ToNarrow correctly. |
| Modules/ThirdParty/KWSys/src/KWSys/ProcessUNIX.c | Good improvements: macOS unlimited FD_SETSIZE, _XOPEN_SOURCE 600 for POSIX conformance, sprintf→snprintf fix, new public kwsysProcess_KillPID API, style/formatting cleanups. |
| Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx | Large refactor: C++ header migration (cstring/cstdio/etc.), macOS copyfile_clone support, linux/fs.h reflink, Win32 Vista baseline, new String.h dependency. No obvious logic regressions. |
| Modules/ThirdParty/KWSys/src/KWSys/SystemTools.hxx.in | API updates: new Status.hxx include, LowerCase/UpperCase changed to pass-by-value, String.hxx removed. const-qualification style change is source-compatible. |
| Modules/ThirdParty/KWSys/src/KWSys/ConsoleBuf.hxx.in | Deleted upstream. ITK does not enable or include ConsoleBuf, so removal is safe for ITK. |
| Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in | Deleted upstream. ITK does not use SharedForward; removal is safe. |
| Modules/ThirdParty/KWSys/src/KWSys/IOStream.cxx | Deleted upstream. ITK does not enable IOStream; removal is safe. |
| Modules/ThirdParty/KWSys/src/KWSys/Terminal.c | Deleted upstream. ITK does not enable Terminal; removal is safe. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ITK Build] --> B[Top-level CMakeLists.txt\ncmake_minimum_required 3.5]
B --> C[Modules/ThirdParty/KWSys/src/CMakeLists.txt\nsets KWSYS_NAMESPACE=itksys]
C --> D[KWSys/CMakeLists.txt\ncmake_minimum_required 3.13]
D --> E{CMake version < 3.13?}
E -- Yes --> F[FATAL_ERROR]
E -- No --> G[Configure KWSys components]
G --> H[hash_map.hxx.in DELETED\nhash_set.hxx.in DELETED\nhash_fun.hxx.in DELETED\nhashtable.hxx.in DELETED]
H --> I[itksys/hash_map.hxx NOT GENERATED]
I --> J[itkEquivalencyTable.h\nitkAutomaticTopologyMeshSource.h\nitkLabelStatisticsImageFilter.h\n+14 more ITK files]
J --> K[Compile failure]
G --> L[Status.hxx.in\nStatus.cxx\ntestDynload*.c]
L --> M[Build succeeds for new components]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[ITK Build] --> B[Top-level CMakeLists.txt\ncmake_minimum_required 3.5]
B --> C[Modules/ThirdParty/KWSys/src/CMakeLists.txt\nsets KWSYS_NAMESPACE=itksys]
C --> D[KWSys/CMakeLists.txt\ncmake_minimum_required 3.13]
D --> E{CMake version < 3.13?}
E -- Yes --> F[FATAL_ERROR]
E -- No --> G[Configure KWSys components]
G --> H[hash_map.hxx.in DELETED\nhash_set.hxx.in DELETED\nhash_fun.hxx.in DELETED\nhashtable.hxx.in DELETED]
H --> I[itksys/hash_map.hxx NOT GENERATED]
I --> J[itkEquivalencyTable.h\nitkAutomaticTopologyMeshSource.h\nitkLabelStatisticsImageFilter.h\n+14 more ITK files]
J --> K[Compile failure]
G --> L[Status.hxx.in\nStatus.cxx\ntestDynload*.c]
L --> M[Build succeeds for new components]
Reviews (1): Last reviewed commit: "Merge branch 'upstream-KWSys' into updat..." | Re-trigger Greptile
| # Select library components. | ||
| IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) | ||
| SET(KWSYS_ENABLE_C 1) | ||
| if(KWSYS_STANDALONE OR CMake_SOURCE_DIR) | ||
| set(KWSYS_ENABLE_C 1) | ||
| # Enable all components. | ||
| SET(KWSYS_USE_Base64 1) | ||
| SET(KWSYS_USE_Directory 1) | ||
| SET(KWSYS_USE_DynamicLoader 1) | ||
| SET(KWSYS_USE_Encoding 1) | ||
| SET(KWSYS_USE_Glob 1) | ||
| SET(KWSYS_USE_MD5 1) | ||
| SET(KWSYS_USE_Process 1) | ||
| SET(KWSYS_USE_RegularExpression 1) | ||
| SET(KWSYS_USE_System 1) | ||
| SET(KWSYS_USE_SystemTools 1) | ||
| SET(KWSYS_USE_CommandLineArguments 1) | ||
| SET(KWSYS_USE_Terminal 1) | ||
| SET(KWSYS_USE_IOStream 1) | ||
| SET(KWSYS_USE_FStream 1) | ||
| SET(KWSYS_USE_String 1) | ||
| SET(KWSYS_USE_SystemInformation 1) | ||
| SET(KWSYS_USE_ConsoleBuf 1) | ||
| ENDIF() | ||
| set(KWSYS_USE_Base64 1) | ||
| set(KWSYS_USE_Directory 1) |
There was a problem hiding this comment.
Removed hash_ headers break multiple ITK modules*
The hash_map.hxx.in, hash_set.hxx.in, hash_fun.hxx.in, and hashtable.hxx.in template files are deleted by this upstream sync and are no longer configured or installed. However, at least 17 ITK public headers and source files still #include "itksys/hash_map.hxx" or #include "itksys/hash_set.hxx", which will cause immediate build failures:
Modules/Core/Common/include/itkEquivalencyTable.hModules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hModules/Core/Common/test/itkHashTableTest.cxxModules/Filtering/ImageStatistics/include/itkAdaptiveEqualizationHistogram.hModules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hModules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hModules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hModules/Nonunit/Review/include/itkLabelGeometryImageFilter.hModules/Nonunit/Review/include/itkContourExtractor2DImageFilter.hModules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hand others.
These ITK modules need to be migrated to std::unordered_map / std::unordered_set (C++11) before or alongside this KWSys update.
| ENDIF() | ||
| ENDFOREACH() | ||
| SET(CMAKE_LEGACY_CYGWIN_WIN32 0) | ||
| cmake_minimum_required(VERSION 3.13...3.31 FATAL_ERROR) |
There was a problem hiding this comment.
CMake minimum version conflict with ITK's stated requirements
The new upstream KWSys cmake_minimum_required raises the minimum from 2.6.3 to 3.13. ITK's top-level CMakeLists.txt declares cmake_minimum_required(VERSION 3.5...3.30), meaning ITK officially supports CMake 3.5+. Any user building with CMake 3.5–3.12 will hit a FATAL_ERROR when CMake processes the KWSys subdirectory, despite the top-level check having already passed. The ITK minimum requirement should be updated to at least 3.13 to align with this change, or KWSys's version constraint should be relaxed to match ITK's floor.
|
This was my concern about trying to bump this, a lot of other dependencies/changes get surfaced we probably don't want to fix. |
|
Time to close this and reopen the other PR? 😄 |
|
Closing: a full KWSys master sync deletes hash_map/hash_set/hashtable (dropped upstream in 49d04c2, 2020-05-22), but ITK release-4.14 still includes itksys/hash_map.hxx and hash_set.hxx across many core modules, so the build fails. No kwsys version bump fixes the C++20 std::allocator::rebind issue without also removing those headers. PR #6513's in-place allocator_traits::rebind_alloc patch is the correct fix for release-4.14. |
Summary
Updates the vendored KWSys third-party library (
Modules/ThirdParty/KWSys) on therelease-4.14branch to upstream master as of 2026-06-23 (KWSys commitaa992d52).KWSys tracks upstream
master(tag="master"inUpdateFromUpstream.sh) rather than a versioned tag, so this is a routine resync to the latest upstream state.Details
KWSys 2026-06-23 (aa992d52)Modules/ThirdParty/KWSys/UpdateFromUpstream.shsubtree merge — the automatic merge applied cleanly with no conflicts.hash_*,SharedForward,ConsoleBuf,IOStream,Terminal, andStringsources, and addition ofStatus,testDynload*, andtestStringsources.Upstream
Notes
upstream/release-4.14.update-third-partyskill.