CMake '-s' argument - recent change in behaviour

Hello,
I am a maintainer of several packages that use CMake in the Fedora Linux.

Recently, after the following commit:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7001
and this release:
cmake-3.23.0-0.1.rc2
the packages builds started to fail on CMake.

I’ve reported a Bugzilla ticket in which I gathered my observations:
https://bugzilla.redhat.com/show_bug.cgi?id=2057738

The thing is I believe that the actual behavior differs from the intended behavior - I believe somewhere between the aforementioned commit and a CMake package release in Fedora, some bug was introduced.
I’m looking forward clarifying the new behavior.


Technical description:
The RPM packages in Fedora Linux are built with RPM macros.
One of them is the “%cmake” macro, and we use it like this:
Tree - rpms/mariadb - src.fedoraproject.org
The macro itself expands to a lot of code, and somewhere inside, there is the following:

/usr/bin/cmake \
     -S "." \
     -B "redhat-linux-build" \
      ~~ lots of more CMake options omitted ~~

In the package SPECfile, I then use “.” option right after the macro

%cmake . \
         -DBUILD_CONFIG=mysql_release \
         -DFEATURE_SET="community" \
         -DINSTALL_LAYOUT=RPM \
         ...

So the path to the source is specified two times.
One in the macro, as
-S "."
Second by the maintainer as
.

1/ I believe, that both options are equivalent - if either one would be removed, the function would not change.
2/ I believe, per
https://gitlab.kitware.com/cmake/cmake/-/blob/v3.23.0-rc2/Source/cmake.h#L202
That it is completely irrelevant what path the maintainer specify, since it should be completely ignored, when “-S” is specified.
3/ I believe that the update of the CMake to the mentioned new version should not have caused build issues.


The workaround exists - removing the path specified by the manintainer.
However I worry, that it is just a workaround while the bugged behavior is not fixed.

Could you please describe to me what is the current intended behavior from your POV ?

This looks like CMake Issue 23334, which has been fixed in more recent release candidates, and the .0 release.