public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] cmake-utils.eclass: die if ninja is enabled but not installed
@ 2015-10-15 15:44 Michael Palimaka
  2015-10-15 16:04 ` Michał Górny
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Palimaka @ 2015-10-15 15:44 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michael Palimaka

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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-17 21:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 15:44 [gentoo-dev] [PATCH] cmake-utils.eclass: die if ninja is enabled but not installed Michael Palimaka
2015-10-15 16:04 ` Michał Górny
2015-10-15 16:22   ` [gentoo-dev] " Michael Palimaka
2015-10-17 17:37     ` Michał Górny
2015-10-17 17:49       ` Matt Turner
2015-10-17 21:34         ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox