[CMake] open source project for CMake ports?

BRM bm_witness at yahoo.com
Tue Feb 17 14:07:25 EST 2009


I read through this thread, and I think there may be a better route -

Instead of trying to create all kinds of patches, etc; why not make a simple tool to convert an autotool project to CMake and vice-versa? Perhaps call it 'autotool2cmake'?

This way, the process becomes simpler:

1) Download source
2) Run tool to convert to CMake (or vice versa)
3) Compile on

This would remove the need to keep 'ports' of any project, would not interfere with how the project developers choose to manage their projects, and enable people to get access both ways - without having to worry about insulting one group or the other.

Further, the process could be simplified in CMake projects by having a command like:

CONVERT_EXTERNAL_SOURCE(<project> <url> <patch list>)
CONVERT_EXTERNAL_SOURCE(<project> <url> <patch dir>)

Or:

# Establish name for the external source, the project, and where to find it
CONVERT_EXTERNAL_SOURCE(<name> <project> <url>)
# get the version into variable so the project could decide which set of patches to apply
EXTERNAL_SOURCE_VERSION(<name> <variable>)
# apply a set of patches against the named project
PATCH_EXTERNAL_SOURCE(<name> <version> <patch list>)
PATCH_EXTERNAL_SOURCE(<name> <version> <patch dir>)

To (i) implement the process above, and (ii) apply any patches the CMake project maintainer wants to apply against it.

And it would give them a stepping stone to such a conversion:
a) add support for CMake (or AutoTools) through the utility, release with support for both CMake and AutoTools
b) release with support for both but one marked as being deprecated
c) drop support for one, continue with using the new, release with just the new

Just a thought; it's probably more more useful to all too - especially for projects that decide to move to (or away from) CMake.

Ben



________________________________
From: Philip Lowman <philip at yhbt.com>
To: Luigi Calori <l.calori at cineca.it>
Cc: CMake Mailing List <cmake at cmake.org>; a.neundorf-work at gmx.net
Sent: Tuesday, February 17, 2009 8:29:07 AM
Subject: Re: [CMake] open source project for CMake ports?


On Mon, Feb 16, 2009 at 6:41 PM, Luigi Calori <l.calori at cineca.it> wrote:

Alexander Neundorf ha scritto:


I do not see value in keeping sources (as VTK does) apart from avoid the download-expand step.
If the cmake scripts use glob rex expr to get source files, it should be quite resilient to project change and should be easier to mantain.
I think that having cmake  support for download,unpack and patch would really help.

For the first cut I think starting out with keeping the CMakified sources in the project would be fine.  Many people are never going to want anything more complicated than this and we know that this will at least work for now.

CMake can already untar with -E mode.  Adding download support wouldn't be too bad.  Not sure how you would handle patching though.  A nicer solution than above would be storing the original tarball + patch in the CM of your project and then having CMake untar + apply it at configure time.  Then you could optionally add download support on top of that for anyone that wants the ability of their project to properly to build to depend on some server out there in the cloud (not me).

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090217/0fdd13b5/attachment.htm>


More information about the CMake mailing list