-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cmake.eclass
cmake_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
+ # FIXME: workaround from cmake-utils; use current working directory instead, bug #704524
+ # esp. test with 'special' pkgs like: app-arch/brotli, media-gfx/gmic, net-libs/quiche
pushd "${S}" > /dev/null || die
default_src_prepare
# 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
case ${CMAKE_MAKEFILE_GENERATOR} in
emake)
[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
- [[ "${CMAKE_VERBOSE}" != "OFF" ]] && local verbosity="VERBOSE=1"
- emake "${verbosity} "$@"
+ case ${CMAKE_VERBOSE} in
+ OFF) emake "$@" ;;
+ *) emake VERBOSE=1 "$@" ;;
+ esac
;;
ninja)
[[ -e build.ninja ]] || die "build.ninja not found. Error during configure stage."
# @DESCRIPTION:
# Banned. Use cmake_build instead.
cmake-utils_src_make() {
- die "cmake_src_make is banned. Use cmake_build instead"
+ die "cmake-utils_src_make is banned. Use cmake_build instead"
}
# @FUNCTION: cmake_src_test