commit: 1bd953502f96253a87c36085d356944621ba00c9
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 17 15:40:11 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 21 10:40:22 2019 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=1bd95350
cmake.eclass: Drop _cmake_ninja_build() and _cmake_emake_build()
Do it all in cmake_build()
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
eclass/cmake.eclass | 41 +++++++++++------------------------------
1 file changed, 11 insertions(+), 30 deletions(-)
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index ef6a5c3d7f..20ba229377 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -547,35 +547,6 @@ cmake_src_compile() {
cmake_build "$@"
}
-# @FUNCTION: _cmake_ninja_build
-# @INTERNAL
-# @DESCRIPTION:
-# Build the package using ninja generator
-_cmake_ninja_build() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -e build.ninja ]] || die "build.ninja not found. Error during
configure stage."
-
- eninja "$@"
-}
-
-# @FUNCTION: _cmake_emake_build
-# @INTERNAL
-# @DESCRIPTION:
-# Build the package using make generator
-_cmake_emake_build() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -e Makefile ]] || die "Makefile not found. Error during configure
stage."
-
- if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
- emake VERBOSE=1 "$@"
- else
- emake "$@"
- fi
-
-}
-
# @FUNCTION: cmake_build
# @DESCRIPTION:
# Function for building the package. Automatically detects the build type.
@@ -586,7 +557,17 @@ cmake_build() {
_cmake_check_build_dir
pushd "${BUILD_DIR}" > /dev/null || die
- _cmake_${CMAKE_MAKEFILE_GENERATOR}_build "$@"
+ 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} ""$@"
+ ;;
+ ninja)
+ [[ -e build.ninja ]] || die "build.ninja not found.
Error during configure stage."
+ eninja "$@"
+ ;;
+ esac
popd > /dev/null || die
}