diff options
author | Kefu Chai <kchai@redhat.com> | 2017-12-09 12:27:03 +0100 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2017-12-15 12:16:12 +0100 |
commit | c869054645daee3bd88abc09ea180848578bb782 (patch) | |
tree | cfd7ba1a5b6ddc9f8225ba90eb456609bac02a25 /src/CMakeLists.txt | |
parent | install-deps.sh: use tee for writing a file (diff) | |
download | ceph-c869054645daee3bd88abc09ea180848578bb782.tar.xz ceph-c869054645daee3bd88abc09ea180848578bb782.zip |
cmake: add WITH_STATIC_LIBSTDCXX option
to link libceph-common with libstdc++ if it is enabled.
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 4c2216de6a08f048374292a567dbabd083d64e87)
Diffstat (limited to '')
-rw-r--r-- | src/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c75a845fd87..4b5b952bbc3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -688,6 +688,10 @@ target_link_libraries(ceph-common ${ceph_common_deps}) set_target_properties(ceph-common PROPERTIES SOVERSION 0 INSTALL_RPATH "") +if(WITH_STATIC_LIBSTDCXX) + set_target_properties(ceph-common PROPERTIES + LINK_FLAGS "-static-libstdc++ -static-libgcc") +endif() install(TARGETS ceph-common DESTINATION ${CMAKE_INSTALL_PKGLIBDIR}) add_library(common_utf8 STATIC common/utf8.c) |