sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: Andraž 'ruskie' Levstik <ruskie AT codemages.net>
- To: Sukneet Basuta <sukneet AT gmail.com>
- Cc: SM-Discuss <sm-discuss AT lists.ibiblio.org>
- Subject: Re: [SM-Discuss] cmake flags in DEPENDS
- Date: Mon, 30 Jul 2012 08:43:03 +0200 (CEST)
:2012-07-30T02:27:Sukneet Basuta:
> To pass cmake flags in kdesdk4, I replaced every instance of ':' with
> '@' in DEPENDS and then replaced every instance of '@' in $OPTS with
> ':' in BUILD, since sorcery uses ':' as a delimiter (see commit
> 600d6654ad05eb0eba73ca796423f595fa162b8b). I chose @ since that seems
> to be a rarely, if ever, used character in OPTS.
>
> It seems to work, but is it safe to do this? Is there a better way of
> doing this?
>
> I suppose I could have checked if each depends is enabled in BUILD and
> manually added each flag to OPTS, but I wanted to be lazy and use the
> standard way of passing flags.
This is already handled in spells check grimoire FUNCTIONS:
# cmake flags use : which is an internal sorcery delimiter.
# In order to facilitate the passing of depends flags, use % instead and call
# this function at the start of BUILD. Don't use it anywhere else.
# Example:
# DEPENDS: depends kdelibs4 -DCRUFT%BOOL=FALSE; ...
# BUILD: prepare_cmake_flags; ...
function prepare_cmake_flags()
{
OPTS="${OPTS//%/:}"
}
cmake_build() {
cd $SOURCE_DIRECTORY &&
mkdir -p build &&
cd build &&
prepare_cmake_flags &&
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT/usr
-DSYSCONFDIR=$INSTALL_ROOT/etc $OPTS ../ &&
make
}
--
Andraž 'ruskie' Levstik
Source Mage GNU/Linux mage
Re-Alpine Coordinator http://sourceforge.net/projects/re-alpine/
Geek/Hacker/Tinker
Knowledge is important, knowledge you know is priceless. Share the knowledge,
build a better future for everyone.
-
[SM-Discuss] cmake flags in DEPENDS,
Sukneet Basuta, 07/30/2012
-
Re: [SM-Discuss] cmake flags in DEPENDS,
Andraž 'ruskie' Levstik, 07/30/2012
-
Re: [SM-Discuss] cmake flags in DEPENDS,
Sukneet Basuta, 07/30/2012
- Re: [SM-Discuss] cmake flags in DEPENDS, Andraž 'ruskie' Levstik, 07/30/2012
-
Re: [SM-Discuss] cmake flags in DEPENDS,
Sukneet Basuta, 07/30/2012
-
Re: [SM-Discuss] cmake flags in DEPENDS,
Andraž 'ruskie' Levstik, 07/30/2012
Archive powered by MHonArc 2.6.24.