Gentoo Archives: gentoo-dev

From: Maciej Mrozowski <reavertm@×××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [RFC] Enable CMAKE_WARN_UNUSED_CLI by default in cmake-utils for EAPI>=6
Date: Tue, 17 May 2016 23:19:59
Message-Id: 2069714.hcXsUUITgk@liwardyna
In Reply to: [gentoo-dev] Re: [RFC] Enable CMAKE_WARN_UNUSED_CLI by default in cmake-utils for EAPI>=6 by Maciej Mrozowski
1 On Monday 02 of May 2016 18:13:38 you wrote:
2 > On Monday 02 of May 2016 18:06:44 you wrote:
3 > > Unfortunately there is common misconception, also among developers, that
4 > > it's sufficient to simply replace "${cmake-utils_use_with foo)" with
5 > > "-DWITH_foo=ON" etc.
6 >
7 > Obvious errata, should be:
8 > Unfortunately there is common misconception, also among developers, that
9 > it's sufficient to simply replace "${cmake-utils_use_with foo)" with "-
10 > DWITH_foo=$(usex foo)" etc.
11
12 And commited:
13
14 diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
15 index ebcb631..427c13f 100644
16 --- a/eclass/cmake-utils.eclass
17 +++ b/eclass/cmake-utils.eclass
18 @@ -87,7 +87,6 @@ _CMAKE_UTILS_ECLASS=1
19 # Warn about variables that are declared on the command line
20 # but not used. Might give false-positives.
21 # "no" to disable (default) or anything else to enable.
22 -: ${CMAKE_WARN_UNUSED_CLI:=no}
23
24 # @ECLASS-VARIABLE: PREFIX
25 # @DESCRIPTION:
26 @@ -113,7 +112,8 @@ _CMAKE_UTILS_ECLASS=1
27 # Should be set by user in a per-package basis in /etc/portage/package.env.
28
29 case ${EAPI} in
30 - 2|3|4|5|6) : ;;
31 + 2|3|4|5) : ${CMAKE_WARN_UNUSED_CLI:=no} ;;
32 + 6) : ${CMAKE_WARN_UNUSED_CLI:=yes} ;;
33 *) die "EAPI=${EAPI:-0} is not supported" ;;
34 esac
35
36 regards
37 MM

Attachments

File name MIME type
signature.asc application/pgp-signature