[CMake] CMakeLists for Hans-J. Boehm garbage collector
Alexander Neundorf
a.neundorf-work at gmx.net
Sun Jun 1 17:09:41 EDT 2008
On Thursday 29 May 2008, David Genest wrote:
> Hi,
>
> I am converting a project from autotools to CMake which has a dependency on
> the the Hans B. GC library. I was wondering what would be the best way to
> go about converting the GC library. This library already comes with a set
> of makefiles for different platforms (NT_MAKEFILE, BCC_MAKEFILE, etc, so I
> was not sure about creating CMakeLists.txt.
If you just want to use the GC, you don't have to build it with cmake, having
a "Finder" for cmake is good enough.
> If I keep the existing makefile build framework, would I have to code
> platform specific sections in my projects CMakeLists.txt in order to use
> the correct makefile depending on the platform ? I suppose I would have to
> call explicitely the correct make (nmake) for the platform.
...but if you need to integrate the GC build into your projects build,
converting it to cmake might make sense.
If you don't convert it, you have to use something like add_custom_target() to
build GC, and then you have to care to call the right make with the right
makefiles depending on the platform.
If you convert GC to cmake, cmake takes care of a lot of things, but you still
may have to care e.g. for different compile flags necessary for different
platforms or different compiler versions.
> Or better, I was wondering if there was a set of CMakeLists.txt for the
> Hans B. garbage collector.
>
> In the end, I would think that a CMake build would remove all these
> makefiles for different platforms and thus be the best solution. Maybe this
Yes.
> work could be submitted to the maintainers
That would be a good thing.
Alex
More information about the CMake
mailing list