From 7a440e37c189fb350b824203221acb9ab7920824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 19 Jul 2021 10:02:30 +0200 Subject: cmake.eclass: Default CMAKE_BUILD_TYPE=RelWithDebInfo in EAPI 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny Signed-off-by: Andreas Sturmlechner --- eclass/cmake.eclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'eclass/cmake.eclass') diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 8befd9e5a9f..3021a3a2b1e 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -42,14 +42,19 @@ _CMAKE_ECLASS=1 # 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 -- cgit v1.2.3