3.23.0-rc2: cmake -S src1 src2 behavior change
Initially discussed on the Fedora development list: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/FC2PGHHPT63HNOMVGFHODUU7OOXC7H74/ -- where a lot of packages are failing to build in Rawhide, which has cmake 3.23.0 RC2, but work fine in Fedora 36 which has cmake 3.22.0
This pattern used to work:
mkdir some-dir
cd some-dir
%cmake ..
cd -
mkdir other-dir
cd other-dir
%cmake ..
cd -
In packages that need to perform several builds (e.g. to build against different runtimes, or to generate shared and static libraries), this pattern is used to make sure the builds are completely separate; the cmake
macro expands in RPM to specify, among others, -S . -B some-build-dir
. so the simplified expansion is cmake -S . - B some-build-dir ..
in cmake 3.22 and below, the ..
overrides the -S .
, but in 3.23, the ..
is ignored; passing %cmake -S ..
instead of %cmake ..
resolved it e.g. in https://src.fedoraproject.org/rpms/lua-luv/pull-request/3
Is the 3.22 behavior correct, and 3.23 has a bug, or is 3.23 correct and the old behavior is deprecated? The release notes does not seem to indicate this is a planned change. Thanks!