On Thu, Aug 6, 2020 at 12:35 PM Neal Gompa <ngompa13(a)gmail.com> wrote:
>
> On Thu, Aug 6, 2020 at 6:20 AM Michal Schorm <mschorm(a)redhat.com> wrote:
> >
> > On Tue, Aug 4, 2020 at 5:54 PM Neal Gompa <ngompa13(a)gmail.com> wrote:
> > > > On Tue, Aug 4, 2020 at 3:12 PM Neal Gompa <ngompa13(a)gmail.com>
wrote:
> > > > > You are not supposed to use %__cmake_builddir.
> > >
> > > It is not documented, and eventually will be removed. So don't rely
on
> > > it. If you want to change the build directory, set %_vpath_builddir
> > > instead.
> >
> > Well, just make it documented ?
> >
>
> The %_vpath_builddir macro is *already* documented:
>
https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/
But it doesn't do what we need.
This %_vpath_builddir macro gives a path to the defined builddir.
While %__cmake_builddir macro gives a path to the *actual* directory
that was used as a builddir.
Which is a huge difference, especially, when we talk about unifying
SPECfiles for F31, F32 and F33.
I see the macro defined as:
%__cmake_builddir
%{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.}
This very line will either be in the
"/usr/lib/rpm/macros.d/macros.cmake" from the
"cmake-rpm-macros.noarch" package, or in every SPECfile that needs
this macro.
Why can't it be part of the standard CMake macros set, given that it
does a different thing than %_vpath_builddir ?
I don't want to document something that I don't want to guarantee as
an interface. That knob will eventually be removed (probably in a
couple of Fedora releases). When I do that, %_vpath_builddir will
always directly map to the build directory passed to CMake.
--
真実はいつも一つ!/ Always, there's only one truth!