Gentoo Archives: gentoo-dev

From: Michael Palimaka <kensington@g.o>
To: gentoo-dev@l.g.o
Cc: Michael Palimaka <kensington@g.o>
Subject: [gentoo-dev] [PATCH] cmake-utils.eclass: die if ninja is enabled but not installed
Date: Thu, 15 Oct 2015 15:45:17
Message-Id: 1444923887-10794-1-git-send-email-kensington@gentoo.org
1 This could happen if ninja is manually enabled (eg. make.conf) but not installed
2 ---
3 eclass/cmake-utils.eclass | 5 +++++
4 1 file changed, 5 insertions(+)
5
6 diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
7 index 480cd09..012b13f 100644
8 --- a/eclass/cmake-utils.eclass
9 +++ b/eclass/cmake-utils.eclass
10 @@ -228,6 +228,11 @@ _generator_to_use() {
11
12 case ${CMAKE_MAKEFILE_GENERATOR} in
13 ninja)
14 + # if ninja is enabled but not installed, the build could fail
15 + # this could happen if ninja is manually enabled (eg. make.conf) but not installed
16 + if ! has_version dev-util/ninja; then
17 + die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR."
18 + fi
19 generator_name="Ninja"
20 ;;
21 emake)
22 --
23 2.4.9

Replies