From: Maciej Mrozowski <reavertm@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [RFC] Enable CMAKE_WARN_UNUSED_CLI by default in cmake-utils for EAPI>=6
Date: Mon, 02 May 2016 18:06:44 +0200 [thread overview]
Message-ID: <2425813.40BMEBc0ED@liwardyna> (raw)
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
Hello,
General advise: do not convert ebuilds inheriting cmake-utils to EAPI 6 unless
you know what you are doing (you are fully aware of eclass behaviour removed
with https://bugs.gentoo.org/show_bug.cgi?id=514384).
Background:
Pre EAPI-6 cmake-utils.eclass contained certain feature to mitigate CMake
variable case changes done by upstream.
This feature was explicitly removed with
https://bugs.gentoo.org/show_bug.cgi?id=514384 and no alternative was
proposed.
It opened new area of possible ebuild regression bugs when switching to EAPI-6
for ebuilds inheriting cmake-utils.eclass.
Unfortunately there is common misconception, also among developers, that it's
sufficient to simply replace "${cmake-utils_use_with foo)" with "-DWITH_foo=ON"
etc.
This is MOST OF THE TIME not the case.
When converting cmake-utils ebuild to EAPI>=6, one needs to consult
CMakeLists.txt wrt case each variable is written with since CMake is case-
sensitive and WITH_FOO != WITH_foo != WITH_Foo.
Proposal:
CMake allows warning about unused CMake variables passed by CLI. Since this is
how Gentoo passes ebuild configuration options, it's proposed to enable this
feature.
Unfortunately it won't fail compilation but at least it gives a chance to spot
case mismatch when reading build output.
Future thoughts:
For better damage control it's technically possible to extend configure phase
of cmake-utuls eclass to check mycmakeargs against parsed package buildsystem
but this might not be very reliable.
regards
MM
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next reply other threads:[~2016-05-02 16:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 16:06 Maciej Mrozowski [this message]
2016-05-02 16:13 ` [gentoo-dev] Re: [RFC] Enable CMAKE_WARN_UNUSED_CLI by default in cmake-utils for EAPI>=6 Maciej Mrozowski
2016-05-17 23:19 ` Maciej Mrozowski
2016-05-18 6:22 ` [gentoo-dev] " Andrew Savchenko
2016-05-18 20:28 ` Maciej Mrozowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2425813.40BMEBc0ED@liwardyna \
--to=reavertm@gmail.com \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox