Re: %{_vpath_builddir} needs to be in the Cmake packaging guidelines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 4, 2020 at 7:22 AM Tom Hughes via devel
<devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On 04/08/2020 14:11, Neal Gompa wrote:
> > On Tue, Aug 4, 2020 at 9:10 AM Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
> >>
> >> On Tue, Aug 4, 2020 at 6:17 AM Michal Schorm <mschorm@xxxxxxxxxx> wrote:
> >>>
> >>> Since this change, all (subsequent) CMake commands (after "%cmake")
> >>> MUST be used with the builddir argument ( "-B %{__cmake_builddir}" ).
> >>
> >>
> >> Ok, I'll use that in the future, but it still needs a mention in the guidelines :)
> >>
> >
> > You are not supposed to use %__cmake_builddir. That macro only exists
> > so we don't have to mutate %_vpath_builddir when switching behaviors
> > through %__cmake_in_source_build.
>
> Surely that's exactly the advantage of using %__cmake_builddir, that it
> points at the place that was actually used for the build regardless of
> whether in source builds are enabled or disabled...
I had to do some similar hackery to make the legion package build
again after the cmake changes:
https://src.fedoraproject.org/rpms/legion/c/bebc0d947b45caa64941507f0f21306b11d87f73?branch=master
certainly not the most elegant way.

My question is if one can set __cmake_builddir to shell variable,
which expands later, something like:

%build
%global __cmake_builddir ${mpi:-serial}
. /etc/profile.d/modules.sh
for mpi in '' mpich openmpi ; do
  test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
  %cmake
  %cmake_build
  test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done

But I am not 100% sure about the expansion order.

Christoph

>
> Tom
>
> --
> Tom Hughes (tom@xxxxxxxxxx)
> http://compton.nu/
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx



-- 
Christoph Junghans
Web: http://www.compphys.de
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux