From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6C61258973 for ; Sun, 17 Jan 2016 12:03:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 384DF21C0F5; Sun, 17 Jan 2016 12:02:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 768C621C0FB for ; Sun, 17 Jan 2016 12:02:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49AB134096F for ; Sun, 17 Jan 2016 12:01:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EA1DECFB for ; Sun, 17 Jan 2016 12:01:53 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1453032096.7004cb2a9495df36057a8add504b61103dfc838a.kensington@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 7004cb2a9495df36057a8add504b61103dfc838a X-VCS-Branch: master Date: Sun, 17 Jan 2016 12:01:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5fc074aa-e87e-4a67-8f63-c21510a257ae X-Archives-Hash: 0facfb4e2d8d96def889d77e83df1cdf commit: 7004cb2a9495df36057a8add504b61103dfc838a Author: Michael Palimaka gentoo org> AuthorDate: Sun Jan 17 12:01:36 2016 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Sun Jan 17 12:01:36 2016 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=7004cb2a cmake-utils.eclass: replace replace comment_add_subdirectory with a namespaced version eclass/cmake-utils.eclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 0190ae4..dea35fd 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -262,11 +262,11 @@ _generator_to_use() { echo ${generator_name} } -# @FUNCTION: comment_add_subdirectory +# @FUNCTION: cmake_comment_add_subdirectory # @USAGE: # @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 @@ -277,6 +277,17 @@ comment_add_subdirectory() { fi } +# @FUNCTION: comment_add_subdirectory +# @USAGE: +# @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: [flag name] # @DESCRIPTION: