thiru-mg commented on code in PR #3435:
URL: https://github.com/apache/avro/pull/3435#discussion_r2213768259
##########
lang/c++/CMakeLists.txt:
##########
@@ -56,8 +56,25 @@ set(AVRO_VERSION
"${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}.${AVRO_VERSION_PAT
project (Avro-cpp)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})
+# Try to respect BUILD_SHARED_LIBS if set. If not set, then fall back to the
original default of
+# both static and shared.
+if (DEFINED BUILD_SHARED_LIBS)
Review Comment:
I agree. Is it not possible to cover all use cases with `AVRO_BUILD_STATIC`
and `AVRO_BUILD_SHARED`? That is, avoid `BUILD_SHARED_LIBS`,
`AVRO_DEFAULT_BUILD_SHARED` and `AVRO_DEFAULT_BUILD_STATIC` altogether.
It may be confusing to let `AVRO_BUILD_STATIC` and `AVRO_BUILD_SHARED` be
`true` by default and require the user explicitly disable them. One way to
address this is to use two other options `AVRO_SKIP_BUILD_SHARED` and
`AVRO_SKIP_BUILD_STATIC` instead. These two options can then be `false` if
omitted.
I think we can leave `AVRO_INSTALL_LIBS` as given here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]