Dnia 15 października 2015 17:44:47 CEST, Michael Palimaka <[email protected]> napisał(a): >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
I'd suggest avoiding has_version and just checking for the binary. type -P, I think. Ciaran can give you the rationale, I believe. >+ 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) -- Best regards, Michał Górny
