/[gentoo-x86]/eclass/cmake-utils.eclass
Gentoo

Diff of /eclass/cmake-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.98 Revision 1.99
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.98 2013/07/02 14:36:20 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.99 2013/07/14 12:50:16 hasufell Exp $
4 4
5# @ECLASS: cmake-utils.eclass 5# @ECLASS: cmake-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
47# @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR 47# @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR
48# @DESCRIPTION: 48# @DESCRIPTION:
49# Specify a makefile generator to be used by cmake. 49# Specify a makefile generator to be used by cmake.
50# At this point only "emake" and "ninja" are supported. 50# At this point only "emake" and "ninja" are supported.
51CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-emake}" 51CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-emake}"
52
53# @ECLASS-VARIABLE: CMAKE_WARN_UNUSED_CLI
54# @DESCRIPTION:
55# Warn about variables that are declared on the command line
56# but not used. Might give false-positives.
57# "no" to disable (default) or anything else to enable.
58CMAKE_WARN_UNUSED_CLI="${CMAKE_WARN_UNUSED_CLI:-no}"
52 59
53CMAKEDEPEND="" 60CMAKEDEPEND=""
54case ${WANT_CMAKE} in 61case ${WANT_CMAKE} in
55 always) 62 always)
56 ;; 63 ;;
470 local mycmakeargs_local=(${mycmakeargs}) 477 local mycmakeargs_local=(${mycmakeargs})
471 else 478 else
472 local mycmakeargs_local=("${mycmakeargs[@]}") 479 local mycmakeargs_local=("${mycmakeargs[@]}")
473 fi 480 fi
474 481
482 if [[ ${CMAKE_WARN_UNUSED_CLI} == no ]] ; then
483 local warn_unused_cli="--no-warn-unused-cli"
484 else
485 local warn_unused_cli=""
486 fi
487
475 # Common configure parameters (overridable) 488 # Common configure parameters (overridable)
476 # NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable 489 # NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
477 # No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect. 490 # No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
478 local cmakeargs=( 491 local cmakeargs=(
479 --no-warn-unused-cli 492 ${warn_unused_cli}
480 -C "${common_config}" 493 -C "${common_config}"
481 -G "$(_generator_to_use)" 494 -G "$(_generator_to_use)"
482 -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}" 495 -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"
483 "${mycmakeargs_local[@]}" 496 "${mycmakeargs_local[@]}"
484 -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" 497 -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.99

  ViewVC Help
Powered by ViewVC 1.1.20