summaryrefslogtreecommitdiff
path: root/eclass/cmake.eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-11-17 16:40:11 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-12-21 11:40:22 +0100
commit1bd953502f96253a87c36085d356944621ba00c9 (patch)
tree4b4ad6cc3012358e573fdeb6cc79e4e850a49b72 /eclass/cmake.eclass
parentfb49f2e0ff1a3ee41804a32d30246eae1ac7ab26 (diff)
downloadkde-1bd953502f96253a87c36085d356944621ba00c9.tar.gz
kde-1bd953502f96253a87c36085d356944621ba00c9.tar.bz2
kde-1bd953502f96253a87c36085d356944621ba00c9.zip
cmake.eclass: Drop _cmake_ninja_build() and _cmake_emake_build()
Do it all in cmake_build() Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/cmake.eclass')
-rw-r--r--eclass/cmake.eclass41
1 files changed, 11 insertions, 30 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index ef6a5c3d7f1..20ba229377b 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
}