diff options
author | Michael Palimaka <kensington@gentoo.org> | 2016-01-26 01:04:12 +1100 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-01-26 01:07:05 +1100 |
commit | b897c5c954fdaae978c636360fa66ad93bb6c663 (patch) | |
tree | 0fc67f8afa7e8ec10fa05a5e060d154d58738d62 /eclass/cmake-utils.eclass | |
parent | cmake-utils.eclass: ban WANT_CMAKE in EAPI 6 and later (diff) | |
download | gentoo-b897c5c954fdaae978c636360fa66ad93bb6c663.tar.gz gentoo-b897c5c954fdaae978c636360fa66ad93bb6c663.tar.bz2 gentoo-b897c5c954fdaae978c636360fa66ad93bb6c663.zip |
cmake-utils.eclass: replace comment_add_subdirectory with a namespaced version
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 32ce3881a3c4..d71f57b055cb 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -250,11 +250,11 @@ _generator_to_use() { echo ${generator_name} } -# @FUNCTION: comment_add_subdirectory +# @FUNCTION: cmake_comment_add_subdirectory # @USAGE: <subdirectory> # @DESCRIPTION: # Comment out an add_subdirectory call in CMakeLists.txt in the current directory -comment_add_subdirectory() { +cmake_comment_add_subdirectory() { if [[ -z ${1} ]]; then die "comment_add_subdirectory must be passed the directory name to comment" fi @@ -265,6 +265,17 @@ comment_add_subdirectory() { fi } +# @FUNCTION: comment_add_subdirectory +# @USAGE: <subdirectory> +# @DESCRIPTION: +# Comment out an add_subdirectory call in CMakeLists.txt in the current directory +# Banned in EAPI 6 and later - use cmake_comment_add_subdirectory instead. +comment_add_subdirectory() { + has "${EAPI:-0}" 2 3 4 5 || die "comment_add_subdirectory is banned in EAPI 6 and later - use cmake_comment_add_subdirectory instead" + + cmake_comment_add_subdirectory "$@" +} + # @FUNCTION: cmake-utils_use_with # @USAGE: <USE flag> [flag name] # @DESCRIPTION: |