/[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.61 Revision 1.65
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.61 2010/12/16 14:36:55 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.65 2011/01/20 00:48:51 reavertm 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#
28# used for optionality) 28# used for optionality)
29WANT_CMAKE="${WANT_CMAKE:-always}" 29WANT_CMAKE="${WANT_CMAKE:-always}"
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.6.2-r1 33# Specify the minimum required CMake version. Default is 2.8.1
34CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}" 34CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
35 35
36CMAKEDEPEND="" 36CMAKEDEPEND=""
37case ${WANT_CMAKE} in 37case ${WANT_CMAKE} in
38 always) 38 always)
39 ;; 39 ;;
266} 266}
267 267
268enable_cmake-utils_src_configure() { 268enable_cmake-utils_src_configure() {
269 debug-print-function ${FUNCNAME} "$@" 269 debug-print-function ${FUNCNAME} "$@"
270 270
271 _check_build_dir init 271 _check_build_dir
272 272
273 # check if CMakeLists.txt exist and if no then die 273 # check if CMakeLists.txt exist and if no then die
274 if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then 274 if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
275 eerror "Unable to locate CMakeLists.txt under:" 275 eerror "Unable to locate CMakeLists.txt under:"
276 eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\"" 276 eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
307 # right ... except for Darwin hosts 307 # right ... except for Darwin hosts
308 IF (NOT APPLE) 308 IF (NOT APPLE)
309 SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) 309 SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
310 SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" 310 SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
311 CACHE STRING "" FORCE) 311 CACHE STRING "" FORCE)
312
313 ELSE ()
314
315 SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX:-/usr}" CACHE STRING ""FORCE)
316 SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
317 SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
318 SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "" FORCE)
319 SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE)
320 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
321 SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX:-/usr}/lib" CACHE STRING "" FORCE)
322
312 ENDIF (NOT APPLE) 323 ENDIF (NOT APPLE)
313 _EOF_ 324 _EOF_
314 fi 325 fi
315 326
316 # Common configure parameters (invariants) 327 # Common configure parameters (invariants)
402 413
403 _check_build_dir 414 _check_build_dir
404 pushd "${CMAKE_BUILD_DIR}" > /dev/null 415 pushd "${CMAKE_BUILD_DIR}" > /dev/null
405 local ctestargs 416 local ctestargs
406 [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" 417 [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
407 ctest ${ctestargs} || die "Tests failed." 418 ctest ${ctestargs} "$@" || die "Tests failed."
408 popd > /dev/null 419 popd > /dev/null
409} 420}
410 421
411# @FUNCTION: cmake-utils_src_configure 422# @FUNCTION: cmake-utils_src_configure
412# @DESCRIPTION: 423# @DESCRIPTION:

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.65

  ViewVC Help
Powered by ViewVC 1.1.20