/[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.69 Revision 1.70
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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.69 2011/06/27 21:11:57 abcd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.70 2011/07/18 09:08:21 dilfridge 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# 8#
30 30
31# @ECLASS-VARIABLE: CMAKE_MIN_VERSION 31# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
32# @DESCRIPTION: 32# @DESCRIPTION:
33# Specify the minimum required CMake version. Default is 2.8.1 33# Specify the minimum required CMake version. Default is 2.8.1
34CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}" 34CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
35
36# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
37# @DESCRIPTION:
38# Space-separated list of CMake modules that will be removed in $S during src_prepare,
39# in order to force packages to use the system version.
40CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}"
41
42# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
43# @DESCRIPTION:
44# Do we want to remove anything? yes or whatever else for no
45CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
35 46
36CMAKEDEPEND="" 47CMAKEDEPEND=""
37case ${WANT_CMAKE} in 48case ${WANT_CMAKE} in
38 always) 49 always)
39 ;; 50 ;;
268 _EOF_ 279 _EOF_
269} 280}
270 281
271enable_cmake-utils_src_configure() { 282enable_cmake-utils_src_configure() {
272 debug-print-function ${FUNCNAME} "$@" 283 debug-print-function ${FUNCNAME} "$@"
284
285 [[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
286 local name
287 for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
288 find "${S}" -name ${name}.cmake -exec rm -v {} +
289 done
290 }
273 291
274 _check_build_dir 292 _check_build_dir
275 293
276 # check if CMakeLists.txt exist and if no then die 294 # check if CMakeLists.txt exist and if no then die
277 if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then 295 if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70

  ViewVC Help
Powered by ViewVC 1.1.20