/[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.57 Revision 1.59
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.57 2010/08/12 19:27:42 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.59 2010/09/16 16:04:11 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#
142_check_build_dir() { 142_check_build_dir() {
143 : ${CMAKE_USE_DIR:=${S}} 143 : ${CMAKE_USE_DIR:=${S}}
144 if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then 144 if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
145 # we build in source dir 145 # we build in source dir
146 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}" 146 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
147 elif [[ ${CMAKE_USE_DIR} = ${WORKDIR} ]]; then
148 # out of tree build, but with $S=$WORKDIR, see bug #273949 for reason.
149 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}/build"
150 else 147 else
151 # regular out of tree build 148 : ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
152 [[ ${1} = init || -d ${CMAKE_USE_DIR}_build ]] && SUF="_build" || SUF=""
153 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}${SUF}"
154 fi 149 fi
155 echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\"" 150 echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
156} 151}
157# @FUNCTION: cmake-utils_use_with 152# @FUNCTION: cmake-utils_use_with
158# @USAGE: <USE flag> [flag name] 153# @USAGE: <USE flag> [flag name]
284 # Fix xdg collision with sandbox 279 # Fix xdg collision with sandbox
285 export XDG_CONFIG_HOME="${T}" 280 export XDG_CONFIG_HOME="${T}"
286 281
287 # @SEE CMAKE_BUILD_TYPE 282 # @SEE CMAKE_BUILD_TYPE
288 if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then 283 if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
289 # Handle debug and release codepaths 284 # Handle release builds
290 if has debug ${IUSE//+} && use debug; then 285 if ! has debug ${IUSE//+} || ! use debug; then
291 append-cppflags -DDEBUG 286 append-cppflags -DNDEBUG
292 else
293 append-cppflags -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM
294 fi 287 fi
295 fi 288 fi
296 289
297 # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS) 290 # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS)
298 local build_rules=${T}/gentoo_rules.cmake 291 local build_rules=${T}/gentoo_rules.cmake

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.20