summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2014-10-02 01:30:34 +1000
committerMichael Palimaka <kensington@gentoo.org>2014-10-02 01:30:34 +1000
commit72cda4f47ce9bfaf31ac5120036991c483c2a317 (patch)
tree2e8825760c2ca2c670e99705c624e9fb6b028c9b
parentc5fd40444262d62aa6b7c7600c8649c2373d9ebf (diff)
downloadkde-72cda4f47ce9bfaf31ac5120036991c483c2a317.tar.gz
kde-72cda4f47ce9bfaf31ac5120036991c483c2a317.tar.bz2
kde-72cda4f47ce9bfaf31ac5120036991c483c2a317.zip
[eclass] Move comment_add_subdirectory from kde{4,5}-functions to cmake-utils.
-rw-r--r--eclass/cmake-utils.eclass15
-rw-r--r--eclass/kde4-functions.eclass15
-rw-r--r--eclass/kde5-functions.eclass15
3 files changed, 15 insertions, 30 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index baaea56b623..1ceadb91468 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -238,6 +238,21 @@ _generator_to_use() {
echo ${generator_name}
}
+# @FUNCTION: comment_add_subdirectory
+# @USAGE: <subdirectory>
+# @DESCRIPTION:
+# Comment out an add_subdirectory call in CMakeLists.txt in the current directory
+comment_add_subdirectory() {
+ if [[ -z ${1} ]]; then
+ die "comment_add_subdirectory must be passed the directory name to comment"
+ fi
+
+ if [[ -e "CMakeLists.txt" ]]; then
+ sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
+ -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
+ fi
+}
+
# @FUNCTION: cmake-utils_use_with
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 7fb9b81899b..a8d3550f886 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -121,21 +121,6 @@ buildsycoca() {
done
}
-# @FUNCTION: comment_add_subdirectory
-# @USAGE: subdirectory
-# @DESCRIPTION:
-# Comment out an add_subdirectory call in CMakeLists.txt in the current directory
-comment_add_subdirectory() {
- if [[ -z ${1} ]]; then
- die "comment_add_subdirectory must be passed the directory name to comment"
- fi
-
- if [[ -e "CMakeLists.txt" ]]; then
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
- fi
-}
-
# @FUNCTION: comment_all_add_subdirectory
# @USAGE: [list of directory names]
# @DESCRIPTION:
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 55ce45b41b3..4d48d0b4b3e 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -55,21 +55,6 @@ else
fi
export KDE_BUILD_TYPE
-# @FUNCTION: comment_add_subdirectory
-# @USAGE: <subdirectory>
-# @DESCRIPTION:
-# Comment out an add_subdirectory call in CMakeLists.txt in the current directory
-comment_add_subdirectory() {
- if [[ -z ${1} ]]; then
- die "comment_add_subdirectory must be passed the directory name to comment"
- fi
-
- if [[ -e "CMakeLists.txt" ]]; then
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
- fi
-}
-
# @FUNCTION: _add_kdecategory_dep
# @INTERNAL
# @DESCRIPTION: