cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl and CMake

From: Andy Cedilnik <andy.cedilnik_at_kitware.com>
Date: Wed, 13 Sep 2006 11:31:30 -0400

Hello,

I have been out of Curl development for a while, but I need some things
from Curl and I was thinking about doing some more lobbying for CMake.

First of all, let me do some advertisement for CMake. CMake
(http://www.cmake.org) is a cross platform build tool, similar to
Auto*tools, QMake, Jam, Scons, and so on. Where CMake differentiates
from these tools, is that it is truly cross platform. In addition to
this, it generates input files for whatever native build system it is.
So, it works on Unix (Makefiles, KDevelop), Mac OSX (Makefiles, Xcode),
Windows (NMake, Borland Make, Visual Studio 6, 7.0, 7.1, 8.0, 32 and 64
bit). It is used for several small and large open and close source
projects, such as Visualization Toolkit (VTK), Scribus, and KDE. KDE
being widely recognized as the largest open-source project in the world.

In addition to simplifying cross platform development, it also provides
cross platform testing tools CTest and a recent addition a cross
platform packaging tool CPack. CTest is used on 20+ projects to do
nightly regression testing of code, including code coverage, memory
checking, etc. CPack is a recent addition which generates native
packages from the project's build directory. Currently it supports Mac
OSX Package Maker, Windows NSIS, and Unix Tar and self extracting tar.
RPM, DEB, and others are in works.

Ok, enough about CMake, let me go to the problem at hand.

In CMake we have been successfully using libcurl for couple of years
now. We are primarily using it to submit results via FTP, HTTP, and
XML-RPC to the Dart testing dashboard. Lately several people requested
access to Curl functionality in the CMake language. For example being
able to download or upload a file from FTP, HTTP directly from CMake or
CTest.

In any case, I was thinking about just providing full Curl interface via
CMake's platform independent shell command support. Currently it
supports things like time, copy files, directories, remove files
directories, tar untar, copy if different and so on. So, for example you
can do:

cmake -E tar xvfz foo.tgz

So, I would like to support:

cmake -E curl -O
http://www.cmake.org/files/v2.4/cmake-2.4.3-Darwin-universal.dmg

and then have similar API in CMake language:

url(GET http://www.cmake.org/files/v2.4/cmake-2.4.3-Darwin-universal.dmg
      OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake-darwin.dmg")

I can do most of this right now, but I would like to make my life easier
and try to get Curl developers to put the CMake lists file for building
Curl and libCurl into Curl source code. This way I can actually make
sure that the Curl is all the time compatible with CMake and I don't
have to do once a year merging of the latest Curl. In addition to
simplifying my life, it would perhaps make porting Curl to different
platforms easier and we could even setup a Dart testing dashboard for Curl.

Comments, suggestions, concerns?

-- 
Andy Cedilnik
Kitware Inc.
Received on 2006-09-13