[Gambas-devel] What about cmake?

Sebastian Kulesz sebikul at ...176...
Sat Oct 5 18:49:56 CEST 2013


On Sat, Oct 5, 2013 at 11:15 AM, Tobias Boege <tobias at ...692...> wrote:

> On Fri, 04 Oct 2013, Sebastian Kulesz wrote:
> > Hey there!
> >
> > Wondering today how cmake works, i started migrating gambas from
> autotools
> > as a test.
> >
> > As of now, only the main/ directory is ported, so it's not a big deal.
> >
> > Ohh, wait! IT IS. The equivalent of <./reconf && ./configure> now only
> > takes 2 seconds! And i can see a percentage report!
> >
> > real 0m2.022s
> > user 0m1.595s
> > sys 0m0.374s
> >
> > It is a bit dirty, but the compiler and interpreter build just fine. I
> have
> > yet to test if they work, but i haven't finished the installation rules.
> >
> > As a note, cmake also integrates with svn to get the revision, so i had
> to
> > tinker around with some include definitions. libtool was also causing
> > trouble, i'm not exactly sure how it works, so i disabled it for the
> moment.
> >
> > I will start porting the rest of the components tree tomorrow to see if i
> > can get something stable enough.
> >
> > Hope you like it!
>
> Well, whatever speeds the reconf/configure process up is totally welcome to
> me.
>
> I was also worried about the increasing number of official components
> shipped with Gambas which make building Gambas the first time a very
> lengthy
> "experience". I just didn't come to a satisfactory solution to this. If
> cmake can decrease the configuration time (by this tremendous factor), it's
> a good thing, IMO. Also, IIRC, its output is coloured :-)
>
> Would you mind starting a new branch for this project so we can have a
> look?
> (If I get the hang of it, I could also convert my components to build with
> cmake in this branch...)
>

I would love to! what should i execute to branch it?
Keep in mind that the source tree changed a lot! This may result in a
harder merge for when this is done (if ever). There are a lot of removed
files and symbolic links.

About the configuration macros that Fabien asked. CMake makes this (almost)
useless, it provides it's own macros to detect if a library is installed or
not, and you then add it to the compilation list only if every dependency
is satisfied. Now, there are some things i could't port. Like libtool
support, for example. I don't know how it works precisely, so i disabled so
the move can be faster. It can then be enabled when this build system works
as expected.

I already moved a third of the code base:
gb.compress.bzlib2
gb.compress.zlib
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.net
gb.net.curl
gb.net.smtp
gb.mime
gb.qt4

Including the main/ directory. I found little trouble with them. There is a
lot left though:

i haven't added installation instructions because i don't know exactly what
autotools does when installing a component, so i left this for later.
There are some macros defined in conf.h that i haven't yet moved, so they
are static for now. Others may not be well defined, i only fixed them to
work at compilation time.




> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20131005/15185bfa/attachment.html>


More information about the Devel mailing list