From: joshuakraemer <joshuakraemer@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
Date: Fri, 16 Jul 2021 00:07:38 +0200 [thread overview]
Message-ID: <20210715220738.gqkDJDGHKgy5tpJ5zzAetDB5mfO0V8e9mc9Onr0z5bE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31990@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 595 bytes --]
There is an updated pull request by joshuakraemer against master on the void-packages repository
https://github.com/joshuakraemer/void-packages cmake-build-style
https://github.com/void-linux/void-packages/pull/31990
Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds `-DNDEBUG` with build types `Release`, `MinSizeRel` and `RelWithDebInfo` (see https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake#L57). `NDEBUG` disables `assert()`, which can improve performance.
A patch file from https://github.com/void-linux/void-packages/pull/31990.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-build-style-31990.patch --]
[-- Type: text/x-diff, Size: 987 bytes --]
From adc2a109d7db875007bf5645bdc3d7d372cffd57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joshua=20Kr=C3=A4mer?= <joshua@kraemer.link>
Date: Thu, 15 Jul 2021 23:56:25 +0200
Subject: [PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo.
---
common/build-style/cmake.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index a7627e7dcf21..c38d76883827 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -64,7 +64,7 @@ _EOF
export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
- CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
+ CFLAGS="${CFLAGS/ -pipe / } -DNDEBUG" CXXFLAGS="${CXXFLAGS/ -pipe / } -DNDEBUG" \
cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
# Replace -isystem with -I
next prev parent reply other threads:[~2021-07-15 22:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 22:04 [PR PATCH] " joshuakraemer
2021-07-15 22:07 ` joshuakraemer [this message]
2021-07-15 22:18 ` q66
2021-07-15 22:19 ` q66
2021-07-16 15:05 ` [PR PATCH] [Updated] " joshuakraemer
2021-07-16 15:10 ` joshuakraemer
2021-07-16 17:48 ` q66
2021-07-16 17:48 ` [PR PATCH] [Merged]: " q66
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=20210715220738.gqkDJDGHKgy5tpJ5zzAetDB5mfO0V8e9mc9Onr0z5bE@z \
--to=joshuakraemer@users.noreply.github.com \
--cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).