diff options
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: |