1 |
Dnia 15 października 2015 17:44:47 CEST, Michael Palimaka <kensington@g.o> napisał(a): |
2 |
>This could happen if ninja is manually enabled (eg. make.conf) but not |
3 |
>installed |
4 |
>--- |
5 |
> eclass/cmake-utils.eclass | 5 +++++ |
6 |
> 1 file changed, 5 insertions(+) |
7 |
> |
8 |
>diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
9 |
>index 480cd09..012b13f 100644 |
10 |
>--- a/eclass/cmake-utils.eclass |
11 |
>+++ b/eclass/cmake-utils.eclass |
12 |
>@@ -228,6 +228,11 @@ _generator_to_use() { |
13 |
> |
14 |
> case ${CMAKE_MAKEFILE_GENERATOR} in |
15 |
> ninja) |
16 |
>+ # if ninja is enabled but not installed, the build could fail |
17 |
>+ # this could happen if ninja is manually enabled (eg. make.conf) |
18 |
>but not installed |
19 |
>+ if ! has_version dev-util/ninja; then |
20 |
|
21 |
I'd suggest avoiding has_version and just checking for the binary. type -P, I think. Ciaran can give you the rationale, I believe. |
22 |
|
23 |
>+ die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not |
24 |
>installed. Please install dev-util/ninja or unset |
25 |
>CMAKE_MAKEFILE_GENERATOR." |
26 |
>+ fi |
27 |
> generator_name="Ninja" |
28 |
> ;; |
29 |
> emake) |
30 |
|
31 |
-- |
32 |
Best regards, |
33 |
Michał Górny |