summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2011-06-27 21:11:57 +0000
committerJonathan Callen <abcd@gentoo.org>2011-06-27 21:11:57 +0000
commit2d56945e59cc7600b46d84afbd368ace280fb008 (patch)
tree2523090e1d165e3c2290297581adb81f83a1c61f /eclass/cmake-utils.eclass
parentMarking numpy-1.6.0 ppc for bug 371673 (diff)
downloadgentoo-2-2d56945e59cc7600b46d84afbd368ace280fb008.tar.gz
gentoo-2-2d56945e59cc7600b46d84afbd368ace280fb008.tar.bz2
gentoo-2-2d56945e59cc7600b46d84afbd368ace280fb008.zip
Only touch CMakeLists.txt once
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r--eclass/cmake-utils.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index a4a1d79eacfd..6a582266770b 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.68 2011/04/27 16:54:44 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.69 2011/06/27 21:11:57 abcd Exp $
# @ECLASS: cmake-utils.eclass
# @MAINTAINER:
@@ -240,6 +240,9 @@ cmake-utils_use() { _use_me_now "" "$@" ; }
_modify-cmakelists() {
debug-print-function ${FUNCNAME} "$@"
+ # Only edit the files once
+ grep -qs "<<< Gentoo configuration >>>" CMakeLists.txt && return 0
+
# Comment out all set (<some_should_be_user_defined_variable> value)
# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
@@ -250,7 +253,7 @@ _modify-cmakelists() {
|| die "${LINENO}: failed to disable hardcoded settings"
# NOTE Append some useful summary here
- cat >> CMakeLists.txt <<- _EOF_
+ cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_
MESSAGE(STATUS "<<< Gentoo configuration >>>
Build type \${CMAKE_BUILD_TYPE}