summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-07-19 10:02:30 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-09-02 18:46:23 +0200
commit7e262b0401cd2bb3bf93064c74cb0207b8f31293 (patch)
tree69b9afb829f862d09d0a7811fa6dbeec8edcc117 /eclass
parentcmake.eclass: Enable CMAKE_INSTALL_ALWAYS (diff)
downloadgentoo-7e262b0401cd2bb3bf93064c74cb0207b8f31293.tar.gz
gentoo-7e262b0401cd2bb3bf93064c74cb0207b8f31293.tar.bz2
gentoo-7e262b0401cd2bb3bf93064c74cb0207b8f31293.zip
cmake.eclass: Default CMAKE_BUILD_TYPE=RelWithDebInfo in EAPI 8
Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cmake.eclass11
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 4203b9364cc3..42a6f95201af 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -42,14 +42,19 @@ inherit flag-o-matic multiprocessing ninja-utils toolchain-funcs xdg-utils
# Eclass can use different cmake binary than the one provided in by system.
: ${CMAKE_BINARY:=cmake}
+[[ ${EAPI} == 7 ]] && : ${CMAKE_BUILD_TYPE:=Gentoo}
# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
# @DESCRIPTION:
# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
# If about to be set - needs to be set before invoking cmake_src_configure.
-# You usually do *NOT* want nor need to set it as it pulls CMake default
-# build-type specific compiler flags overriding make.conf.
-: ${CMAKE_BUILD_TYPE:=Gentoo}
+#
+# The default is RelWithDebInfo as that is least likely to append undesirable
+# flags. However, you may still need to sed CMake files or choose a different
+# build type to achieve desirable results.
+#
+# In EAPI 7, the default was non-standard build type of Gentoo.
+: ${CMAKE_BUILD_TYPE:=RelWithDebInfo}
# @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
# @DEFAULT_UNSET