241f923a6f Drop Visual Studio 12 2013 generator
7c1b671c3a Tests: Disable VSXaml test pending update to newer VS versions
9042aa1af5 Tests: Remove WinCE tests
810e33f67a Tests: Simplify tests for Visual Studio generators
1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9782
Iterate over the object's members and call a filter callable to decide what
to do with the current key/value. A filter returns one of the `FilterResult`
values. A container type is an associative or a sequence container of pairs
(key, value).
Refactor `MapFilter()` and `Map()` to use `FilteredObject()`. Moreover,
for C++ >= 17 implementation is more optimized depending on the given filter
object type and capable of detecting and properly calling the filter callable
using 1 or 3 arguments, up to totally eliminate any checking (even dummy)
in the generated code.
Supported container types, used to append key/value items, aren't limited to
`std::map` only and can be any associative container or a sequenced one with
pairs of key/value as elements.
`cmake_path(GET "foo/.." STEM out)` is supposed to set `out` to `".."`,
the entire `cmake_path(GET "foo/.." FILENAME)` result.
However, the `GetNarrowStem()` logic in `cmCMakePath` was lacking
the `.` and `..` special-casing logic present in other methods.
As a result, it would erroneously trim the second `.` off of a stem
of `..` and return only `.`.
This caused the result of `cmake_path(GET "foo/.." STEM)` to be `"."`.
Making the standard empty-or-.-or-.. checks and bailing out early
fixes the result of `cmCMakePaths{".."}.GetNarrowStem()`.
Fixes: #26235
ceeea4e511 cmake_parse_arguments: Set variable if empty string given after keyword
2f5cc6afa1 cmParseArgumentsCommand: Use cmStrCat() for string concatenation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9748
If a single-value keyword is followed by an empty string, the
command unsets the variable for that keyword instead of setting
it to the empty string. This is inconsistent and unexpected. Add
policy CMP0174 which ensures the variable for a single-value
keyword is always set when any value is given, not just for a
non-empty value.
The new CMP0174 policy only affects the PARSE_ARGV form of
cmake_parse_arguments. The older form silently drops all empty
string arguments before processing the argument list.
Fixes: #25972
8d1803d463 AutoGen: Run batch scripts using cmd.exe on windows platforms explicitly
9ab270f47d cmSystemTools: Add GetComspec method to get cmd on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9733
The CreateProcessW function requires to use the cmd.exe when
attempting to execute batch scripts. AutoMoc RunProcess relies on
CreateProcessW in it's internals. Currently the cmd.exe run happens
implicitly for batch files(perhaps by luck), but this is not
documented anywhere.
This replaces the .bat files in the AutoGen related command lines with
explicit 'cmd.exe /c' call. Also 'cmd.exe /c' has own limitation
related to the arguments. The very first argument shouldn't be quoted
otherwise this lead to the parsing issues. So for the .bat files that
contain spaces in their paths use short name conversion.
Fixes#26208
The function attempts to read the path to cmd executable from the
COMSPEC environment variable. Falls back to cmd.exe if the respective
environment variable is not set or path doesn't exist.
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
When a library file name is encountered multiple times, reuse the result
from the first time. This more closely matches the behavior of the
dynamic loader on Linux.
Fixes: #24621