1 |
--- |
2 |
eclass/cmake-utils.eclass | 15 +++++++++++++-- |
3 |
1 file changed, 13 insertions(+), 2 deletions(-) |
4 |
|
5 |
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
6 |
index 1de863f..e8b24bd 100644 |
7 |
--- a/eclass/cmake-utils.eclass |
8 |
+++ b/eclass/cmake-utils.eclass |
9 |
@@ -250,11 +250,11 @@ _generator_to_use() { |
10 |
echo ${generator_name} |
11 |
} |
12 |
|
13 |
-# @FUNCTION: comment_add_subdirectory |
14 |
+# @FUNCTION: cmake_comment_add_subdirectory |
15 |
# @USAGE: <subdirectory> |
16 |
# @DESCRIPTION: |
17 |
# Comment out an add_subdirectory call in CMakeLists.txt in the current directory |
18 |
-comment_add_subdirectory() { |
19 |
+cmake_comment_add_subdirectory() { |
20 |
if [[ -z ${1} ]]; then |
21 |
die "comment_add_subdirectory must be passed the directory name to comment" |
22 |
fi |
23 |
@@ -265,6 +265,17 @@ comment_add_subdirectory() { |
24 |
fi |
25 |
} |
26 |
|
27 |
+# @FUNCTION: comment_add_subdirectory |
28 |
+# @USAGE: <subdirectory> |
29 |
+# @DESCRIPTION: |
30 |
+# Comment out an add_subdirectory call in CMakeLists.txt in the current directory |
31 |
+# Banned in EAPI 6 and later - use cmake_comment_add_subdirectory instead. |
32 |
+comment_add_subdirectory() { |
33 |
+ has "${EAPI:-0}" 2 3 4 5 || die "comment_add_subdirectory is banned in EAPI 6 and later - use cmake_comment_add_subdirectory instead" |
34 |
+ |
35 |
+ cmake_comment_add_subdirectory "$@" |
36 |
+} |
37 |
+ |
38 |
# @FUNCTION: cmake-utils_use_with |
39 |
# @USAGE: <USE flag> [flag name] |
40 |
# @DESCRIPTION: |
41 |
-- |
42 |
2.4.10 |