diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-02-21 13:28:06 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-02-21 13:33:01 +0100 |
commit | 7ba20cc083a22aa4d3b0434e9b615efe7140554a (patch) | |
tree | f7ddc7cfd6b45e71c3edc240fc7987da0c13b905 /eclass/cmake.eclass | |
parent | cmake.eclass: Documentation: cmake_src_prepare() *MUST* be run (diff) | |
download | kde-7ba20cc083a22aa4d3b0434e9b615efe7140554a.tar.gz kde-7ba20cc083a22aa4d3b0434e9b615efe7140554a.tar.bz2 kde-7ba20cc083a22aa4d3b0434e9b615efe7140554a.zip |
cmake.eclass: Group all banned cmake-utils_* functions together
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/cmake.eclass')
-rw-r--r-- | eclass/cmake.eclass | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 7fd74b548f..5bead99f6f 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -127,14 +127,6 @@ if [[ ${PN} != cmake ]]; then BDEPEND+=" dev-util/cmake" fi -# @FUNCTION: _cmake_banned_func -# @INTERNAL -# @DESCRIPTION: -# Banned functions are banned. -_cmake_banned_func() { - die "${FUNCNAME[1]} is banned. use -D$1<related_CMake_variable>=\"\$(usex $2)\" instead" -} - # @FUNCTION: _cmake_check_build_dir # @INTERNAL # @DESCRIPTION: @@ -193,18 +185,6 @@ comment_add_subdirectory() { die "comment_add_subdirectory is banned. Use cmake_comment_add_subdirectory instead" } -# @FUNCTION: cmake-utils_use_with -# @INTERNAL -# @DESCRIPTION: -# Banned. Use -DWITH_FOO=$(usex foo) instead. -cmake-utils_use_with() { _cmake_banned_func WITH_ "$@" ; } - -# @FUNCTION: cmake-utils_use_enable -# @INTERNAL -# @DESCRIPTION: -# Banned. Use -DENABLE_FOO=$(usex foo) instead. -cmake-utils_use_enable() { _cmake_banned_func ENABLE_ "$@" ; } - # @FUNCTION: cmake_use_find_package # @USAGE: <USE flag> <package name> # @DESCRIPTION: @@ -223,6 +203,26 @@ cmake_use_find_package() { echo "-DCMAKE_DISABLE_FIND_PACKAGE_$2=$(use $1 && echo OFF || echo ON)" } +# @FUNCTION: _cmake_banned_func +# @INTERNAL +# @DESCRIPTION: +# Banned functions are banned. +_cmake_banned_func() { + die "${FUNCNAME[1]} is banned. use -D$1<related_CMake_variable>=\"\$(usex $2)\" instead" +} + +# @FUNCTION: cmake-utils_use_with +# @INTERNAL +# @DESCRIPTION: +# Banned. Use -DWITH_FOO=$(usex foo) instead. +cmake-utils_use_with() { _cmake_banned_func WITH_ "$@" ; } + +# @FUNCTION: cmake-utils_use_enable +# @INTERNAL +# @DESCRIPTION: +# Banned. Use -DENABLE_FOO=$(usex foo) instead. +cmake-utils_use_enable() { _cmake_banned_func ENABLE_ "$@" ; } + # @FUNCTION: cmake-utils_use_disable # @INTERNAL # @DESCRIPTION: |