ams-tschoening commented on a change in pull request #22: Only exporting the
log4cxx symbols by default
URL: https://github.com/apache/logging-log4cxx/pull/22#discussion_r407178479
##########
File path: CMakeLists.txt
##########
@@ -18,6 +18,13 @@ if(NOT BUILD_SHARED_LIBS)
set(LOG4CXX_COMPILE_DEFINITIONS LOG4CXX_STATIC)
endif()
+option(EXPORT_ONLY_LOG4CXX_SYMBOLS "Only exports the log4cxx symbols" ON)
+if(BUILD_SHARED_LIBS AND EXPORT_ONLY_LOG4CXX_SYMBOLS)
+ SET(LINKER_VERSION_SCRIPT_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/src/main/resources/log4cxx.map")
+ SET(LINKER_VERSION_SCRIPT_FLAG
"-Wl,--version-script=${LINKER_VERSION_SCRIPT_FILE}")
Review comment:
So `log4cxx.map` is linker-specific and might be named more specifically?
Something like `log4cxx.gnu[_ld].map` or something like that? You already
mentioned Visual Studio, so something like `log4cxx.[vs|borland].def` might
need to be added in future as well? Do all those files share some common name
one could reuse, something about symbols or exporting or linking or ...?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services