gnustep-dev
[Top][All Lists]
Advanced

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

Heads up: CMake build system for libobjc


From: David Chisnall
Subject: Heads up: CMake build system for libobjc
Date: Thu, 13 Dec 2012 13:40:14 +0000

Hello the list,

Those following svn will have seen this in the libobjc2 commit log:

> Add CMake build system for libobjc2.  This will replace the existing build
> systems after some further testing.
> 
> Currently, we have three build systems for libobjc2:
> 
> - GNUmakefile, which provides a number of options but not very cleanly (i.e.
>   the only way of knowing what they are is to read the source) and doesn't
>   correctly build the Objective-C++ runtime.
> - Makefile, which works correctly for a single configuration, but requires
>   tweaking by hand to build others.
> - Makefile.clang, which is experimental, doesn't really work, and confuses
>   people.
> 
> The new CMake system:
> 
> - Correctly installs in a GNUstep location if one exists, or in a system
>   location otherwise.  This is configurable at build time.
> - Provides inspectable options for all of the configuration choices (run 
> ccmake
>   to see them all)
> - Easily supports cross-compilation and out-of-tree builds
> - Is easy to extend and inspect
> - Automatically builds the LLVM optimisations (which already use CMake, as 
> it's
>   the only clean way of building LLVM optimisations out of tree) and can be
>   easily configured not to if they are not required.
> - Will build a single libobjc.so for platforms that provide a separate C++
>   runtime and a separate libobjcxx for ones that don't.
> - Can generate build files for make, ninja, XCode, Eclipse, and Visual Studio
> 
> For those unfamiliar with CMake, the best way of building is an out-of-tree
> build.  For the simplest case, it's just a matter of:
> 
> $ mkdir build
> $ cd build
> $ cmake ..
> $ make
> $ sudo -E make install
> 
> If you wish to edit any of the configuration options, the easiest way is to 
> run
> ccmake instead of cmake.  You can also run ccmake . from the build directory 
> to
> edit the options after initial configuration.
> 
> For faster builds , try using ninja instead of make.  Add -G Ninja to the
> [c]cmake command line and then run ninja instead of make.

The current CMake-based build system in libobjc2 trunk should support a 
superset of the functionality of the existing build systems and is the one that 
I intend to maintain going forward.  If you have an existing GNUstep install, 
then it gives you the option of installing in either your Local or System 
directory, otherwise it defaults to your operating system's standard install 
location.

This addresses the bootstrapping problem, as it allows all of the configurable 
options with no GNUstep dependencies.  These were previously only available 
when building with GNUstep Make.  It is now possible to just configure and 
install the runtime once, with the options that you want, then install -make.

I will be removing the other build systems soon, so please test this,

David

-- Send from my Jacquard Loom




reply via email to

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