Skip to content

Commit

Permalink
cmake.eclass: Default CMAKE_BUILD_TYPE=RelWithDebInfo in EAPI 8
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
mgorny authored and a17r committed Sep 2, 2021
1 parent 11a3001 commit 7e262b0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eclass/cmake.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e262b0

Please sign in to comment.