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.
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.ato users. We just need to provide onelibnimble.so/libnimble.ato users. (If we provide separated manylibnimble_XXX.so/libnimble_XXX.ato users like Abseil does, it will be inconvenience.)I think that we can use the following approaches for one
libnimble.so/libnimble.a:add_library()in Nimbleadd_library()and multiple "object library" https://cmake.org/cmake/help/latest/command/add_library.html#object-librariesadd_library()s in NimbleIf 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.