/[gentoo-x86]/eclass/cmake-utils.eclass
Gentoo

Diff of /eclass/cmake-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.110 Revision 1.111
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.110 2014/08/12 14:58:40 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.111 2014/10/15 13:44:24 kensington Exp $
4 4
5# @ECLASS: cmake-utils.eclass 5# @ECLASS: cmake-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
116 CMAKEDEPEND+="${WANT_CMAKE}? ( " 116 CMAKEDEPEND+="${WANT_CMAKE}? ( "
117 ;; 117 ;;
118esac 118esac
119inherit toolchain-funcs multilib flag-o-matic eutils 119inherit toolchain-funcs multilib flag-o-matic eutils
120 120
121case ${EAPI:-0} in 121case ${EAPI} in
122 2|3|4|5) : ;; 122 2|3|4|5) : ;;
123 *) die "EAPI=${EAPI} is not supported" ;; 123 *) die "EAPI=${EAPI:-0} is not supported" ;;
124esac 124esac
125 125
126CMAKE_EXPF="src_prepare src_configure src_compile src_test src_install" 126CMAKE_EXPF="src_prepare src_configure src_compile src_test src_install"
127EXPORT_FUNCTIONS ${CMAKE_EXPF} 127EXPORT_FUNCTIONS ${CMAKE_EXPF}
128 128
234 die "Value ${CMAKE_MAKEFILE_GENERATOR} is not supported" 234 die "Value ${CMAKE_MAKEFILE_GENERATOR} is not supported"
235 ;; 235 ;;
236 esac 236 esac
237 237
238 echo ${generator_name} 238 echo ${generator_name}
239}
240
241# @FUNCTION: comment_add_subdirectory
242# @USAGE: <subdirectory>
243# @DESCRIPTION:
244# Comment out an add_subdirectory call in CMakeLists.txt in the current directory
245comment_add_subdirectory() {
246 if [[ -z ${1} ]]; then
247 die "comment_add_subdirectory must be passed the directory name to comment"
248 fi
249
250 if [[ -e "CMakeLists.txt" ]]; then
251 sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
252 -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
253 fi
239} 254}
240 255
241# @FUNCTION: cmake-utils_use_with 256# @FUNCTION: cmake-utils_use_with
242# @USAGE: <USE flag> [flag name] 257# @USAGE: <USE flag> [flag name]
243# @DESCRIPTION: 258# @DESCRIPTION:

Legend:
Removed from v.1.110  
changed lines
  Added in v.1.111

  ViewVC Help
Powered by ViewVC 1.1.20