3c3 < # $Header: $ --- > # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.79 2012/05/08 21:27:10 dilfridge Exp $ 44a45,50 > # @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR > # @DESCRIPTION: > # Specify a makefile generator to be used by cmake. At this point only "make" > # and "ninja" is supported. > CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-make}" > 168a175,183 > > # Determine which generator to use > _generator_to_use() { > if [[ ${CMAKE_MAKEFILE_GENERATOR} = "ninja" ]]; then > has_version dev-util/ninja && echo "Ninja" && return > fi > echo "Unix Makefiles" > } > 374a390 > -G "$(_generator_to_use)" 406,409c422,430 < # first check if Makefile exist otherwise die < [[ -e Makefile ]] || die "Makefile not found. Error during configure stage." < if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then < emake VERBOSE=1 "$@" || die "Make failed!" --- > if [[ $(_generator_to_use) = Ninja ]]; then > # first check if Makefile exist otherwise die > [[ -e build.ninja ]] || die "Makefile not found. Error during configure stage." > if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then > #TODO get load average from portage (-l option) > ninja ${MAKEOPTS} -v "$@" > else > ninja "$@" > fi || die "ninja failed!" 411c432,438 < emake "$@" || die "Make failed!" --- > # first check if Makefile exist otherwise die > [[ -e Makefile ]] || die "Makefile not found. Error during configure stage." > if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then > emake VERBOSE=1 "$@" || die "Make failed!" > else > emake "$@" || die "Make failed!" > fi 421c448,452 < base_src_install "$@" --- > if [[ $(_generator_to_use) = Ninja ]]; then > DESTDIR=${D} ninja install "$@" > else > base_src_install "$@" > fi