Gentoo Archives: gentoo-dev

From: Fabulous Zhang Zheng <zheng1181822466@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] USE=ninja to compile by ninja, otherwise by make
Date: Fri, 29 Jul 2022 19:02:54
Message-Id: CAJwjFt3nBfrhjUvprSQgzPYPsmBh3vKhkvRqd_srwSp1ijsYHQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] USE=ninja to compile by ninja, otherwise by make by Fabulous Zhang Zheng
1 Sorry for bothering.
2
3 Fabulous Zhang Zheng <zheng1181822466@×××××.com> 于2022年7月30日周六 01:31写道:
4
5 > Thanks for your reply
6 >
7 > <waebbl-gentoo@××××××.net> 于2022年7月30日周六 01:09写道:
8 >
9 >> On Sat, 30 Jul 2022 00:38:54 +0800
10 >> Fabulous Zhang Zheng <zheng1181822466@×××××.com> wrote:
11 >>
12 >> > Dear everyone,
13 >> >
14 >> >
15 >> > While gentoo-devhelp is a better place for questions, it's been inactive
16 >> > for years so I sent an email here. Apologies if this is solely for
17 >> gentoo
18 >> > developers.
19 >>
20 >> There's #gentoo-dev-help
21 >>
22 >> >
23 >> > After trying to read cmake.eclass source code, I think separately
24 >> denoting
25 >> > ninja/make in src_compile and src_install might be possible. But
26 >> > cmake_build still automatically detects the build type so I am confused.
27 >> >
28 >>
29 >> Take a look at CMAKE_MAKEFILE_GENERATOR variable used in cmake.eclass.
30 >> You want to change this from the default to emake if you want to use
31 >> make instead of ninja.
32 >>
33 >>
34 >> I noticed this variable before but it must be set before inherit.
35 > If I try something like:
36 >
37 > if ! use ninja; then
38 > CMAKE_MAKEFILE_GENERATOR=emake
39 > fi
40 > inherit cmake xdg ninja-utils
41 >
42 > pkgcheck will say report error:
43 > external commands disallowed during metadata regen: 'use ninja'
44 >
45 > Best regards
46 >
47
48 I asked this question in #gentoo-dev-help.
49
50 According to @iamben and @floppy, using the default ninja is best supported,
51 emake would only be preferred if the package fails with ninja.
52
53 And apologies again, for bothering with this list,
54 I was not aware of the IRC.
55
56 Best regards