Commit f817aff7 authored by Davide Cavalca's avatar Davide Cavalca Committed by Facebook GitHub Bot

folly: set shared libraries version

Summary:
This should make packaging folly easier, as it allows one to set the
.so version to denote ABI breaks. Specifically, we're looking to use this in
https://bugzilla.redhat.com/show_bug.cgi?id=1887621 to package folly in Fedora
and have the version match the tagged release version (i.e. treat every release
as ABI breaking).

Differential Revision: D24451669

fbshipit-source-id: f63be760c90567117f1ebbec37416c0d9d8a4736
parent 3b1bdb98
......@@ -38,7 +38,9 @@ set(CMAKE_MODULE_PATH
# package information
set(PACKAGE_NAME "folly")
set(PACKAGE_VERSION "0.58.0-dev")
if (NOT DEFINED PACKAGE_VERSION)
set(PACKAGE_VERSION "0.58.0-dev")
endif()
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/facebook/folly/issues")
......@@ -378,6 +380,7 @@ option(PYTHON_EXTENSIONS
add_library(folly
$<TARGET_OBJECTS:folly_base>
)
set_property(TARGET folly PROPERTY VERSION ${PACKAGE_VERSION})
apply_folly_compile_options_to_target(folly)
target_compile_features(folly INTERFACE cxx_generic_lambdas)
......@@ -388,6 +391,7 @@ add_library(folly_test_util
${FOLLY_DIR}/test/DeterministicSchedule.cpp
${FOLLY_DIR}/test/JsonTestUtil.cpp
)
set_property(TARGET folly_test_util PROPERTY VERSION ${PACKAGE_VERSION})
target_link_libraries(folly_test_util
PUBLIC
${BOOST_LIBRARIES}
......
......@@ -16,6 +16,7 @@ add_library(
follybenchmark
Benchmark.cpp
)
set_property(TARGET follybenchmark PROPERTY VERSION ${PACKAGE_VERSION})
target_link_libraries(follybenchmark PUBLIC folly)
apply_folly_compile_options_to_target(follybenchmark)
install(
......
......@@ -18,6 +18,7 @@ if (FOLLY_HAVE_ELF AND FOLLY_HAVE_DWARF)
ExceptionTracer.cpp
StackTrace.cpp
)
set_property(TARGET folly_exception_tracer_base PROPERTY VERSION ${PACKAGE_VERSION})
apply_folly_compile_options_to_target(folly_exception_tracer_base)
target_link_libraries(
folly_exception_tracer_base
......@@ -29,6 +30,7 @@ if (FOLLY_HAVE_ELF AND FOLLY_HAVE_DWARF)
ExceptionStackTraceLib.cpp
ExceptionTracerLib.cpp
)
set_property(TARGET folly_exception_tracer PROPERTY VERSION ${PACKAGE_VERSION})
apply_folly_compile_options_to_target(folly_exception_tracer)
target_link_libraries(
folly_exception_tracer
......@@ -39,6 +41,7 @@ if (FOLLY_HAVE_ELF AND FOLLY_HAVE_DWARF)
folly_exception_counter
ExceptionCounterLib.cpp
)
set_property(TARGET folly_exception_counter PROPERTY VERSION ${PACKAGE_VERSION})
apply_folly_compile_options_to_target(folly_exception_counter)
target_link_libraries(
folly_exception_counter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment