- Refactor and optimize the loop to make it shorter and faster
- Make it push elements into an arbitrary (templated) output iterator
- Make it a template on a separator type with the most used defaults
- Add a backward compatible signature to return `std::vector<std::string>`
- Add an alternative function `cmTokenizedView()` to return a vector of string views
ee83165923 cmake: Explicitly normalize input paths as they exist on disk
9d44a77454 find_*: Explicitly normalize found paths as they exist on disk
967d3ea85c cmake-gui: Explicitly normalize input paths as they exist on disk
074ad98ebc ctest: Explicitly normalize input paths as they exist on disk
1f14238701 cpack: Explicitly normalize input paths as they exist on disk
9fe09ebc53 cmSystemTools: Add GetEnvPathNormalized to get paths from environment
2108f3507f cmSystemTools: Add SplitEnvPathNormalized to split paths from environment
6d57403e14 cmSystemTools: Fix SplitEnvPath to avoid empty paths
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9929
The call is unnecessary since commit 438809d3ba (cmCPackGenerator: Add
option to FindTemplate to use alternate builtin path, 2024-03-06,
v3.30.0-rc1~353^2~4).
"Console" unexpectedly matches the reserved name regex. This revealed
that `cmCPackNSISGenerator::CreateComponentDescription()` needs to use
the name returned by `GetSanitizedDirOrFileName()` for the component
file glob.
Fix the change from commit a1af593291 (CPack: Support arbitrary
component name when packaging, 2024-05-01, v3.30.0-rc1~151^2~1) to
address these issues and add related checks to the `CPackNSISGenerator`
test case.
Issue: #23612
First, use `cmGeneratedFileStream` to avoid touching an existing file
unless its contents change and to get atomic replacement. Also add a
scope to ensure that the file is in place (at `fout`'s destructor)
before doing anything with the packaging scripts.
See: https://discourse.cmake.org/t/1773
CPack no longer blindly tries to create temporary packaging
(sub)directories that contain the verbatim name of a component, which
might contain characters that are not supported on the platform /
filesystem.
Instead, if the component's name contains a (possibly) problematic
character its MD5 hash will be used for that temporary packaging
(sub)directory.
Likewise, if the component's name resembles a reserved device name (e.g.
"COM1" on Windows) then the temporary packaging (sub)directory will get
this name prefixed with an underscore.
Similar, if it ends in a dot (on Windows) then the temporary packaging
(sub)directory will get this name suffixed with an underscore.
Fixes: #23612
The variable `CPACK_TEMPORARY_DIRECTORY` is an internal variable that is
required for proper packaging. Historically, a second variable
`CPACK_TEMPORARY_INSTALL_DIRECTORY` existed as well which had the same
purpose. Both variables had to be set to the same value. Otherwise,
CPack would not succeed with packaging.
In order to ease CPack's usage, the variable
`CPACK_TEMPORARY_INSTALL_DIRECTORY` is now no longer used.
However, as it cannot be guaranteed that neither of these two (internal)
variables have been used in the wild, some mechanism was introduced to
preserve backwards-compatibility: If one of these variables is set, the
other variable will be set to the same value. If, however, both are set
to different values, CPack still fails but with an explicit
error-message.
Fixes: #25046
Add a new `CPACK_WIX_INSTALL_SCOPE` variable to set the `InstallScope`
when using the default WiX template. Set the default to the bug-free
value `perMachine`.
Fixes: #20962