diff options
author | Bassam Tabbara <bassam.tabbara@quantum.com> | 2016-11-05 02:10:08 +0100 |
---|---|---|
committer | Bassam Tabbara <bassam.tabbara@quantum.com> | 2016-11-29 08:48:02 +0100 |
commit | c6067f48ec7aa927129e98bf8424d80ed03119f3 (patch) | |
tree | edf542d1c65ab22b89ba5a2ed1f4d29509746073 /src/test/libcephd | |
parent | Merge pull request #12170 from dzafman/wip-ec-error-tests (diff) | |
download | ceph-c6067f48ec7aa927129e98bf8424d80ed03119f3.tar.xz ceph-c6067f48ec7aa927129e98bf8424d80ed03119f3.zip |
embedded: Add a skeleton libcephd library
libcephd is a library that contains ceph daemon code
that can be statically linked in other applications.
Added MergeStaticLibraries.cmake that can merge static libraries
to form a bigger one. This approach avoids the need to mess with
STATIC libraries all over the code base.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
Diffstat (limited to 'src/test/libcephd')
-rw-r--r-- | src/test/libcephd/CMakeLists.txt | 18 | ||||
-rw-r--r-- | src/test/libcephd/misc.cc | 7 | ||||
-rw-r--r-- | src/test/libcephd/test.cc | 2 |
3 files changed, 27 insertions, 0 deletions
diff --git a/src/test/libcephd/CMakeLists.txt b/src/test/libcephd/CMakeLists.txt new file mode 100644 index 00000000000..cb711ec0ad4 --- /dev/null +++ b/src/test/libcephd/CMakeLists.txt @@ -0,0 +1,18 @@ +# cephdtest +set(cephdtest_srcs + test.cc) +add_library(cephdtest STATIC ${cephdtest_srcs}) +set_target_properties(cephdtest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) + +# ceph_test_cephd_api_misc +add_executable(ceph_test_cephd_api_misc + misc.cc + ) +set_target_properties(ceph_test_cephd_api_misc PROPERTIES COMPILE_FLAGS + ${UNITTEST_CXX_FLAGS}) +target_link_libraries(ceph_test_cephd_api_misc + cephd global ${UNITTEST_LIBS} cephdtest z snappy) + +install(TARGETS + ceph_test_cephd_api_misc + DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/test/libcephd/misc.cc b/src/test/libcephd/misc.cc new file mode 100644 index 00000000000..274699d6ecc --- /dev/null +++ b/src/test/libcephd/misc.cc @@ -0,0 +1,7 @@ +#include "gtest/gtest.h" +#include "include/cephd/libcephd.h" + +TEST(LibCephdMiscVersion, Version) { + int major, minor, extra; + cephd_version(&major, &minor, &extra); +} diff --git a/src/test/libcephd/test.cc b/src/test/libcephd/test.cc new file mode 100644 index 00000000000..aa90d10e9ab --- /dev/null +++ b/src/test/libcephd/test.cc @@ -0,0 +1,2 @@ +void doNothing() { +} |