Subject: Re: [PATCH] Cmake-ify c-ares -- v2

Re: [PATCH] Cmake-ify c-ares -- v2

From: David Drysdale via c-ares <c-ares_at_cool.haxx.se>
Date: Tue, 27 Sep 2016 15:51:33 +0100

Just following up on a couple of points from last time round, plus a
question for Daniel below.

On Tue, Sep 27, 2016 at 12:44 PM, Brad House via c-ares
<c-ares_at_cool.haxx.se> wrote:
> I've attached v2 of my CMake patch for c-ares. The changes are:

[snip]

>>>> - The CMake build seems to assume use of the main source code
>>>> directory, but I've seen other CMake builds that allow parallel build
>>>> subdirectories. If the latter is possible, it might allow an autoconf
>>>> build and a CMake build to use a shared source tree, reducing the size
>>>> of the Travis build matrix.
>>>
>>>
>>>
>>> Actually, that's not true. I never build using cmake in the main source
>>> tree. I typically do something like:
>>>
>>> cd c-ares
>>> mkdir build
>>> cd build
>>> cmake -DCMAKE_BUILD_TYPE=DEBUG -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON ..
>>> make

This works OK for me now; not sure what I was doing wrong last time.

>>>
>>> However, I haven't seen what would happen if the autoconf version ran
>>> in the source tree and CMake ran outside. I can't guarantee it would
>>> reference the right ares_config.h/ares_build.h files. It *should* since
>>> it sets the include path of the build directory first.
>>>
>>>
>>>> - For tidiness it would be nice to update .gitignore to list any
>>>> CMake build detritus.
>>>
>>>
>>>
>>> We could, but I typically wouldn't recommend building in the source
>>> directory anyhow Its not like autoconf that has to run ./buildconf
>>> to generate a bunch of files before ./configure can run so I'm not
>>> sure if it makes sense to add any exclusions.

Yep, makes sense.

>>>
>>>>
>>>> A couple of other questions (from a CMake n00b):
>>>> - Where does SOVERSION of 3.0.1 come from?
>>>
>>> I extracted that from the autotools Makefile.am:
>>> CARES_VERSION_INFO = -version-info 3:0:1
>>>
>>> I'm pretty sure these are equivalent.

Daniel, what's the guidelines/process for updating CARES_VERSION_INFO
for a release? It looks like it was updated for 1.10.0 but not for 1.11.0...
Received on 2016-09-27