summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-07-14 12:50:16 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-07-14 12:50:16 +0000
commita8ae20949daf5ec26e7f8fb65ecee351e23ba615 (patch)
tree829d74d26db2f49ba50a7dab2b36b480fc9d597e /eclass
parentAdd app-arch/cpio to DEPEND, bug #471890 (diff)
downloadgentoo-2-a8ae20949daf5ec26e7f8fb65ecee351e23ba615.tar.gz
gentoo-2-a8ae20949daf5ec26e7f8fb65ecee351e23ba615.tar.bz2
gentoo-2-a8ae20949daf5ec26e7f8fb65ecee351e23ba615.zip
add CMAKE_WARN_UNUSED_CLI to cmake-utils.eclass
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/cmake-utils.eclass17
2 files changed, 19 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index a0fcb6d53171..873472a045f8 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.878 2013/07/11 18:38:59 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.879 2013/07/14 12:50:16 hasufell Exp $
+
+ 14 Jul 2013; Julian Ospald <hasufell@gentoo.org> cmake-utils.eclass:
+ add CMAKE_WARN_UNUSED_CLI
11 Jul 2013; Ulrich Müller <ulm@gentoo.org> bzr.eclass:
New variable EBZR_UNPACK_DIR.
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 6fbd0f7cbbb8..18620a383b2d 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.98 2013/07/02 14:36:20 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.99 2013/07/14 12:50:16 hasufell Exp $
# @ECLASS: cmake-utils.eclass
# @MAINTAINER:
@@ -50,6 +50,13 @@ CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
# At this point only "emake" and "ninja" are supported.
CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-emake}"
+# @ECLASS-VARIABLE: CMAKE_WARN_UNUSED_CLI
+# @DESCRIPTION:
+# Warn about variables that are declared on the command line
+# but not used. Might give false-positives.
+# "no" to disable (default) or anything else to enable.
+CMAKE_WARN_UNUSED_CLI="${CMAKE_WARN_UNUSED_CLI:-no}"
+
CMAKEDEPEND=""
case ${WANT_CMAKE} in
always)
@@ -472,11 +479,17 @@ enable_cmake-utils_src_configure() {
local mycmakeargs_local=("${mycmakeargs[@]}")
fi
+ if [[ ${CMAKE_WARN_UNUSED_CLI} == no ]] ; then
+ local warn_unused_cli="--no-warn-unused-cli"
+ else
+ local warn_unused_cli=""
+ fi
+
# Common configure parameters (overridable)
# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
local cmakeargs=(
- --no-warn-unused-cli
+ ${warn_unused_cli}
-C "${common_config}"
-G "$(_generator_to_use)"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"