Re: [Chicken-users] CMake build support

2014-02-11 Thread Peter Bex
On Tue, Feb 11, 2014 at 12:18:04AM +0400, Oleg Kolosov wrote:
 Hello All.
 
 I am happy to inform you that I have achieved some success converting
 Chicken build system from Makefiles to CMake. This initial work is a
 proof of concept and still very ugly and incomplete, but certainly will
 be improved. I've created a fork of Chicken on
 https://github.com/bazurbat/chicken-scheme/tree/cmake-build, so anyone
 interested can track progress and make requests there.
 
 If you have proposals or suggestions for the new build system, let's
 discuss.

Hi Oleg,

First off, thanks for putting in this amount of effort already.

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?

Cheers,
Peter
-- 
http://www.more-magic.net

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] CMake build support

2014-02-11 Thread Oleg Kolosov
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 https://github.com/bazurbat/chicken-scheme/tree/cmake-build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/chicken .. # or cmake -GNinja
 for really fast build, needs http://martine.github.io/ninja/
cmake --build . --target install # or ninja install
export CHICKEN_PREFIX=$HOME/opt/chicken
$HOME/opt/chicken/bin/csi -n

-- 
Regards, Oleg


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] CMake build support

2014-02-10 Thread Matt Welland
Hi Oleg,

What is the purpose of switching to cmake? Can the transition be done without 
adding another dependency to building for mingw-msys?

I guess my concern is that even if cmake is an improvement over make that the 
impact can still be negative on the community.

For me the interesting platforms for chicken are:

Linux (several generations in current use).
Android (admittedly this is in my dreams :))
Windows mingw-msys

When you are done can I expect that my builds for these platforms will be as 
easy as they are today?

I missed the discussion of this on the chicken lists so my appologies if this 
has been hashed to death but in my opinion open source projects are very 
vunerable to pertubations and I really want to see chicken thriving, not just 
surviving. A change like this alienating even a single strong developer can 
hurt. Hopefully the developers are already on board with your vision in this.

Matt
-=-


From my Android phone on T-Mobile. The first nationwide 4G network.

 Original message 
From: Oleg Kolosov bazur...@gmail.com 
Date: 02/10/2014  1:18 PM  (GMT-07:00) 
To: chicken-users@nongnu.org 
Subject: [Chicken-users] CMake build support 
 
Hello All.

I am happy to inform you that I have achieved some success converting
Chicken build system from Makefiles to CMake. This initial work is a
proof of concept and still very ugly and incomplete, but certainly will
be improved. I've created a fork of Chicken on
https://github.com/bazurbat/chicken-scheme/tree/cmake-build, so anyone
interested can track progress and make requests there.

If you have proposals or suggestions for the new build system, let's
discuss.

-- 
Regards, Oleg


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] CMake build support

2014-02-10 Thread Oleg Kolosov
On 02/11/14 01:07, Matt Welland wrote:
 Hi Oleg,

 What is the purpose of switching to cmake? Can the transition be done
 without adding another dependency to building for mingw-msys?

 I guess my concern is that even if cmake is an improvement over make
 that the impact can still be negative on the community.

 For me the interesting platforms for chicken are:

 Linux (several generations in current use).
 Android (admittedly this is in my dreams :))
 Windows mingw-msys

 When you are done can I expect that my builds for these platforms will
 be as easy as they are today?

 I missed the discussion of this on the chicken lists so my appologies
 if this has been hashed to death but in my opinion open source
 projects are very vunerable to pertubations and I really want to see
 chicken thriving, not just surviving. A change like this alienating
 even a single strong developer can hurt. Hopefully the developers are
 already on board with your vision in this.
Hi!
There was not any discussion, I've decided to try first, discuss later.
Consider this thread the initial request for comments.

I maintain build system for projects at my workplace, we are
cross-compiling for embedded platform, desktop, there are plans for
mobile, and dealing with Chicken (with eggs and dependencies) as
projects grow becomes really painful. So this is partially internal, and
partially personal project. I'm trying to implement CMake based scripts
alongside current system. Ideally, it should be completely optional.

Current goals are: fix few annoyances in building cross Chicken with
eggs, a way to generate configurable self-contained executables, native
Windows build (with installer). All this might take a long time.

-- 
Regards, Oleg

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] CMake build support

2014-02-10 Thread Matt Welland



From my Android phone on T-Mobile. The first nationwide 4G network.

 Original message 
From: Oleg Kolosov bazur...@gmail.com 
Date: 02/10/2014  3:09 PM  (GMT-07:00) 
To: Matt Welland m...@kiatoa.com,chicken-users chicken-users@nongnu.org 
Subject: Re: [Chicken-users] CMake build support 
 
On 02/11/14 01:07, Matt Welland wrote:
Hi Oleg,

What is the purpose of switching to cmake? Can the transition be done without 
adding another dependency to building for mingw-msys?

I guess my concern is that even if cmake is an improvement over make that the 
impact can still be negative on the community.

For me the interesting platforms for chicken are:

Linux (several generations in current use).
Android (admittedly this is in my dreams :))
Windows mingw-msys

When you are done can I expect that my builds for these platforms will be as 
easy as they are today?

I missed the discussion of this on the chicken lists so my appologies if this 
has been hashed to death but in my opinion open source projects are very 
vunerable to pertubations and I really want to see chicken thriving, not just 
surviving. A change like this alienating even a single strong developer can 
hurt. Hopefully the developers are already on board with your vision in 
this.
 Hi!
 There was not any discussion, I've decided to
 try first, discuss later. Consider this thread the
 initial request for comments.

Ah! Ok, fair enough. 

 I maintain build system for projects at 
 my workplace, we are cross-compiling 
 for embedded platform, desktop, there 
 are plans for mobile, and dealing with 
 Chicken (with eggs and dependencies) 
 as projects grow becomes really painful. 
 So this is partially internal, and partially
 personal project. I'm trying to implement
 CMake based scripts alongside 
 current system. Ideally, it should be
 completely optional.

Ok, I understand. This would certainly ease any transition.

 Current goals are: fix few annoyances 
 in building cross Chicken with eggs, a way 
 to generate configurable self-contained
 executables, native Windows build (with
  installer). All this might take a long time.

If I read this correctly it sounds as if with CMake it would be possible to 
leverage the build system to not merely build chicken but also to install 
dependent eggs and even further to use it for the build for the final 
application. Is this what you envision?

If so, this is a new idea to me. I see installing chicken as a pre-developmment 
step. My application then has it's own makefile 100% independent of chicken. 

If CMake resulted in an easier to use deploy mechanism I'd be thrilled. Deploy 
is a super cool feature but I seem to have a hard time getting it to work 
sometimes.

Matt
-- 
Regards, Oleg___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users