summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-03-29 20:44:48 -0400
committerAndreas Sturmlechner <asturm@gentoo.org>2020-04-02 02:46:31 +0200
commit14a4616cf802f3b897d9daf74901d7522aabebdf (patch)
tree32f4f9301510567a19818c4bcfb524f25bb159e6 /eclass
parent879550836a1eed6bf7d9137a2bcec6b79f48ada0 (diff)
downloadkde-14a4616cf802f3b897d9daf74901d7522aabebdf.tar.gz
kde-14a4616cf802f3b897d9daf74901d7522aabebdf.tar.bz2
kde-14a4616cf802f3b897d9daf74901d7522aabebdf.zip
cmake.eclass: do not append -DNDEBUG to CPPFLAGS
The NDEBUG macro turns the assert() function into a noop. This gives a small performance boost, but may allow subtle programming errors to go unnoticed. This code was added back in 2008, when we started passing -DCMAKE_BUILD_TYPE=None instead of Release or Debug. It probably tries to mimic a default behavior of Release type builds. Other common build systems do not do this by default. For example, autoconf's AC_HEADER_ASSERT macro only sets NDEBUG if --disable-assert is passed to configure (it defaults to enabled). It is better to let users add this to CPPFLAGS themselves if they really want to save those few CPU cycles. Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cmake.eclass9
1 files changed, 0 insertions, 9 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 462316d3b27..f1e013cd248 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -371,15 +371,6 @@ cmake_src_configure() {
# Fix xdg collision with sandbox
xdg_environment_reset
- # @SEE CMAKE_BUILD_TYPE
- if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
- # Handle release builds
- if ! in_iuse debug || ! use debug; then
- local CPPFLAGS=${CPPFLAGS}
- append-cppflags -DNDEBUG
- fi
- fi
-
# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.)
local build_rules=${BUILD_DIR}/gentoo_rules.cmake