I have a best practices question. I read in the documentation regarding BUILD_SHARED_LIBS
:
https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
This documentation contains the following passage:
This variable is often added to projects as an
option()
so that each user of a project can decide if they want to build the project using shared or static libraries.
But exposing that variable as an option will affect all dependent cmake projects as well, which might interfere with these projects. Thus, shouldn’t it be considered bad practice to expose the BUILD_SHARED_LIBS
as an option?