[CMake] How do static libraries get linked in Ninja?

Robert Maynard robert.maynard at kitware.com
Thu Jan 5 16:39:34 EST 2017


Do you mean you don't see where the static library is created or where
the static library is listed on the link line for the dynamic library?

On Thu, Jan 5, 2017 at 11:30 AM, Robert Dailey <rcdailey.lists at gmail.com> wrote:
> I have two targets in CMake: a static library and a shared library.
> The shared library specifies the static library as a target link
> library.
>
> When I generate for Ninja, and I run:
>
> $ ninja -v
>
> During the link command for the shared library, I do not see the
> static library specified to g++. I do see *.so files, but not *.a
> files. Why are static libraries not showing up on the command line for
> the link step? There must be some black magic happening that I'm not
> seeing...
> --
>
> 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:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list