Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 764653 - dev-cpp/benchmark: enable -DNDEBUG by default (i suggest USE=-debug)
Summary: dev-cpp/benchmark: enable -DNDEBUG by default (i suggest USE=-debug)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Breathitt Gray
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2021-01-09 19:12 UTC by Sergei Trofimovich (RETIRED)
Modified: 2021-01-11 17:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-09 19:12:51 UTC
When dev-cpp/benchmark is sued today benchmarks complain as:

https://github.com/google/benchmark/blob/master/src/reporter.cc#L73
```
  Out << "***WARNING*** Library was built as DEBUG. Timings may be "
         "affected.\n";
```

I suggest disabling debugging facility for benchmark to avoid error spam as:

--- a/dev-cpp/benchmark/benchmark-1.5.2.ebuild
+++ b/dev-cpp/benchmark/benchmark-1.5.2.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-IUSE="test"
+IUSE="debug test"
 RESTRICT="!test? ( test )"

 src_configure() {
@@ -22,5 +22,7 @@ src_configure() {
                -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF
        )

+       use debug || append-cppflags -DNDEBUG
+
        cmake_src_configure
 }
Comment 1 Larry the Git Cow gentoo-dev 2021-01-11 17:47:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90660acc63a622dc6aba16646f2a69e4c8ee61c2

commit 90660acc63a622dc6aba16646f2a69e4c8ee61c2
Author:     William Breathitt Gray <vilhelm.gray@gmail.com>
AuthorDate: 2021-01-09 21:27:27 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-01-11 17:47:12 +0000

    dev-cpp/benchmark: Add support for debug USE flag
    
    Closes: https://bugs.gentoo.org/764653
    Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/19011
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-cpp/benchmark/benchmark-1.5.2.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)