Skip to content

Reduce needless add_library() #298

@kou

Description

@kou

This is for preparing libnimble.so/libnimble.a.

In the current CMake configuration, we use add_library() per component (like Velox does).

Most of these add_library()s are "normal libraries": https://cmake.org/cmake/help/latest/command/add_library.html#normal-libraries

"Normal libraries" are for generating static/shared/module libraries. But we don't need to provide multiple separated libnimble_XXX.so/libnimble_XXX.a to users. We just need to provide one libnimble.so/libnimble.a to users. (If we provide separated many libnimble_XXX.so/libnimble_XXX.a to users like Abseil does, it will be inconvenience.)

I think that we can use the following approaches for one libnimble.so/libnimble.a:

If we need to use the same object files for multiple artifacts, the latter approach (using "object library" add_library()) will reduce build time. But we don't have the use case. So I think that the former approach is better in Nimble. The former is simpler than the latter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions