[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] CMake build support

From: Oleg Kolosov
Subject: Re: [Chicken-users] CMake build support
Date: Wed, 12 Feb 2014 03:09:57 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 02/11/14 12:49, Peter Bex wrote:
> Now, about the CMake build: Let me start by saying I'm extremely
> sceptical about doing this because of CHICKEN's history with CMake.
> Furthermore, *if* we do this I put down the same hard requirement that
> Felix put down when I refactored the GNU Make build: The build *must*
> work and be tested on *all* supported platforms before we switch.
> If people object to having CMake, we must consider their reasons as well.
> The build scripts which I can see look very clean, though, so it may be
> worth the switch.  I am trying to grok the CMakeLists.txt;  could you
> explain where "chicken_wrap_sources" and "chicken_add_source" are coming
> from, for example?  I quickly scanned the sources but couldn't find its
> definition.
> If this is some implicit "function" (what do they call these?) from
> CMake, where can I find out about it in the documentation?
> I don't see any code to take care of any of the non-"standard" build
> flags (ie, anything aside the least common UNIX denominator).
> Does CMake take care of these things?  And what about the prefixing
> and suffixing of the binaries that are built (PROGRAM_PREFIX and
> PROGRAM_SUFFIX), which is used for cross-compilation?
> Does cross-compilation work at all?
Currently I'm trying to provide alternative build system for common
platforms, it does not conflict with Makefiles in any way. With out of
tree CMake build you can even have both simultaneously. This is how I
actually test things. CMake handles many platform-specific things,
looking at current Make rules it should not be much trouble to provide
few options for non standard flags. I can add Linux, Windows and maybe
Mac OSX support myself.

All supporting macros and functions included by toplevel CMakeLists.txt
are in /cmake folder.

Cross-compilation is the first major goal, but it is not ready yet.

I've added some prefix/suffix and installation handling. Procedure for
testing (linux only so far):

git clone
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/chicken .. # or "cmake -GNinja
...." for really fast build, needs
cmake --build . --target install # or ninja install
export CHICKEN_PREFIX=$HOME/opt/chicken
$HOME/opt/chicken/bin/csi -n

Regards, Oleg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]