[CMake] Including existing make files into cmake

Alexander Neundorf a.neundorf-work at gmx.net
Mon Feb 4 14:38:12 EST 2008


On Tuesday 29 January 2008, Ali - wrote:
> Hi,
>
> There is this existing big project which is based on autotools and I am
> trying to simply include the existing make files into my cmake project
> (don't even mention the possibility of converting the whole thing to cmake,
> this is the project owners problem). I was able to sucessfully implement
> this inclusion manually and this is what I mean by 'manually':
>
> After generating the cmake output for a unix-like project, for the target
> of interest this file needs to be edited:
>
> /CMakeFiles/[target].dir/build.make
>
> The editing simply involves 2 modifications:
>
> (1) Somewhere in this file the include line for the existing make file is
> added.
>
> (2) Somewhere in the compile command all the flags from the existing make
> file, stored in one single variable $(EXISTING_MAKE_FLAGS), is added.
>
> The above works fine, the only pain is that I have to edit the build.make
> file every time I re-run the cmake command. The question is, how can this
> be automated by cmake commands?

I think this doesn't sound good.
Can you instead add a target to the outer makefile which calls make on the 
cmake generated makefile ?

Alex


More information about the CMake mailing list