[CMake] Invoking "make" with CMake scripts?

Alexander Neundorf a.neundorf-work at gmx.net
Thu Nov 27 15:26:51 EST 2008


On Thursday 27 November 2008, Robert Dailey wrote:
> On Wed, Nov 26, 2008 at 5:41 PM, Michael Jackson <
...
> >> Is this the recommended way to handle this issue? What would you guys
> >> recommend? Should I provide precompiled binaries for all platforms in
> >> version control so I don't have to worry about making CMake build APR,
> >> or would you recommend complex CMake logic to handle calling

Why do you think it would require _complex_ CMake logic ?
You could add a custom command which calls make for APR, which depends on the 
Makefile of APR, which is created by a custom command which executes 
configure for APR (or what they have).

> >> EXECUTE_PROCESS() for APR on all platforms? Either way you look at it,
> >> it looks like a nightmare.
> >
> > Well, it depends on how much time and energy you have to devote to APR.
> > If APR isn't too complicated and you are quick with CMake you can always
> > create a CMake Build system for APR. I ended up doing this for my own
> > project dependencies (HDF5, expat, tiff) but then again I had the luxury
> > of the time to do that.
> >
> >  I think EXECUTE_PROCESS is about your only choice. Precompiled binaries
> > work if you can manage the various build configurations that your users
> > will need.
> >
> > I just took a look at APR (http://apr.apache.org) and I don't think
> > creating a CMake based build system is probably in your time horizon..
> > :-)
>
> Are you saying creating CMakeLists files for APR would be too time
> consuming? If so, why do you say this?

Well, it depends on how complex the APR build process is, how good you know it 
and how good you are with cmake :-)

You need to convert all necessary configure checks to cmake, which can take 
some time. APR is the apache runtime, right ?
This is quite cross-platform, so maybe it has a lot of tests. Making sure that 
the converted ones produce everywhere the same results as the original ones 
can be time consuming.
Is this about introducing cmake as official buildsystem for APR or just for 
you ?
If it's just for you, it also means you have to track the changes in the 
buildsystem of newer versions of APR.

Alex



More information about the CMake mailing list