-
Notifications
You must be signed in to change notification settings - Fork 54
Description
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:
- One normal library
add_library()in Nimble - One normal library
add_library()and multiple "object library" https://cmake.org/cmake/help/latest/command/add_library.html#object-librariesadd_library()s in Nimble
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.