1 |
commit: 72cda4f47ce9bfaf31ac5120036991c483c2a317 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 1 15:30:34 2014 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 1 15:30:34 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=72cda4f4 |
7 |
|
8 |
[eclass] Move comment_add_subdirectory from kde{4,5}-functions to cmake-utils. |
9 |
|
10 |
--- |
11 |
eclass/cmake-utils.eclass | 15 +++++++++++++++ |
12 |
eclass/kde4-functions.eclass | 15 --------------- |
13 |
eclass/kde5-functions.eclass | 15 --------------- |
14 |
3 files changed, 15 insertions(+), 30 deletions(-) |
15 |
|
16 |
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
17 |
index baaea56..1ceadb9 100644 |
18 |
--- a/eclass/cmake-utils.eclass |
19 |
+++ b/eclass/cmake-utils.eclass |
20 |
@@ -238,6 +238,21 @@ _generator_to_use() { |
21 |
echo ${generator_name} |
22 |
} |
23 |
|
24 |
+# @FUNCTION: comment_add_subdirectory |
25 |
+# @USAGE: <subdirectory> |
26 |
+# @DESCRIPTION: |
27 |
+# Comment out an add_subdirectory call in CMakeLists.txt in the current directory |
28 |
+comment_add_subdirectory() { |
29 |
+ if [[ -z ${1} ]]; then |
30 |
+ die "comment_add_subdirectory must be passed the directory name to comment" |
31 |
+ fi |
32 |
+ |
33 |
+ if [[ -e "CMakeLists.txt" ]]; then |
34 |
+ sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ |
35 |
+ -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})" |
36 |
+ fi |
37 |
+} |
38 |
+ |
39 |
# @FUNCTION: cmake-utils_use_with |
40 |
# @USAGE: <USE flag> [flag name] |
41 |
# @DESCRIPTION: |
42 |
|
43 |
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass |
44 |
index 7fb9b81..a8d3550 100644 |
45 |
--- a/eclass/kde4-functions.eclass |
46 |
+++ b/eclass/kde4-functions.eclass |
47 |
@@ -121,21 +121,6 @@ buildsycoca() { |
48 |
done |
49 |
} |
50 |
|
51 |
-# @FUNCTION: comment_add_subdirectory |
52 |
-# @USAGE: subdirectory |
53 |
-# @DESCRIPTION: |
54 |
-# Comment out an add_subdirectory call in CMakeLists.txt in the current directory |
55 |
-comment_add_subdirectory() { |
56 |
- if [[ -z ${1} ]]; then |
57 |
- die "comment_add_subdirectory must be passed the directory name to comment" |
58 |
- fi |
59 |
- |
60 |
- if [[ -e "CMakeLists.txt" ]]; then |
61 |
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ |
62 |
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})" |
63 |
- fi |
64 |
-} |
65 |
- |
66 |
# @FUNCTION: comment_all_add_subdirectory |
67 |
# @USAGE: [list of directory names] |
68 |
# @DESCRIPTION: |
69 |
|
70 |
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass |
71 |
index 55ce45b..4d48d0b 100644 |
72 |
--- a/eclass/kde5-functions.eclass |
73 |
+++ b/eclass/kde5-functions.eclass |
74 |
@@ -55,21 +55,6 @@ else |
75 |
fi |
76 |
export KDE_BUILD_TYPE |
77 |
|
78 |
-# @FUNCTION: comment_add_subdirectory |
79 |
-# @USAGE: <subdirectory> |
80 |
-# @DESCRIPTION: |
81 |
-# Comment out an add_subdirectory call in CMakeLists.txt in the current directory |
82 |
-comment_add_subdirectory() { |
83 |
- if [[ -z ${1} ]]; then |
84 |
- die "comment_add_subdirectory must be passed the directory name to comment" |
85 |
- fi |
86 |
- |
87 |
- if [[ -e "CMakeLists.txt" ]]; then |
88 |
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ |
89 |
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})" |
90 |
- fi |
91 |
-} |
92 |
- |
93 |
# @FUNCTION: _add_kdecategory_dep |
94 |
# @INTERNAL |
95 |
# @DESCRIPTION: |