From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7EFC013888F for ; Thu, 15 Oct 2015 15:45:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 282D121C058; Thu, 15 Oct 2015 15:45:09 +0000 (UTC) Received: from mail.astralcloak.net (astralcloak.net [66.246.75.167]) by pigeon.gentoo.org (Postfix) with ESMTP id 42B4021C00C for ; Thu, 15 Oct 2015 15:45:08 +0000 (UTC) Received: from mail.astralcloak.net (mail.astralcloak.net [127.0.0.1]) by mail.astralcloak.net (Postfix) with ESMTPSA id E4AB865 From: Michael Palimaka To: gentoo-dev@lists.gentoo.org Cc: Michael Palimaka Subject: [gentoo-dev] [PATCH] cmake-utils.eclass: die if ninja is enabled but not installed Date: Fri, 16 Oct 2015 02:44:47 +1100 Message-Id: <1444923887-10794-1-git-send-email-kensington@gentoo.org> X-Mailer: git-send-email 2.4.9 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 027050fb-fc88-4b67-9b32-5654660258f5 X-Archives-Hash: 1e427d382a5fc9bd084c40a0584856c1 This could happen if ninja is manually enabled (eg. make.conf) but not installed --- eclass/cmake-utils.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 480cd09..012b13f 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -228,6 +228,11 @@ _generator_to_use() { case ${CMAKE_MAKEFILE_GENERATOR} in ninja) + # if ninja is enabled but not installed, the build could fail + # this could happen if ninja is manually enabled (eg. make.conf) but not installed + if ! has_version dev-util/ninja; then + die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." + fi generator_name="Ninja" ;; emake) -- 2.4.9