Hi,

On Tue, Sep 24, 2019 at 11:41:54PM +0300, Avraham Shukron wrote:

> I have a library which I want to distribute in both shared object and
> static library forms.

Is that a requirement for your project, or a requirement for the system
integrator?

With my Debian Developer hat on, I'm always grateful when a project's build
system doesn't do anything unexpected.

We know that libtool generates shared and static libraries at the same
time, and so when wrapping an autoconf based project, we use a single build
tree and expect both to pop up.

With CMake, we know that the build system cannot generate both at the same
time. It would be cool if it could, but the expectation is that a library
project will have to be built twice, and our tools mirror that expectation.

If the majority of your users compile from source and need both shared and
static libraries to be built, it makes sense to have two targets.
Otherwise, the principle of least surprise applies.

That said, a hypothetical future version of CMake that makes this easier so
we can at some point remove the requirement to build twice would be
awesome.

   Simon
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to