COMMAND ${CMAKE_CTEST_COMMAND}
DEPENDS tests)
+option(WITH_SYSTEMD "build with systemd support" ON)
+
add_subdirectory(src)
add_subdirectory(qa)
add_subdirectory(man)
endif(WITH_MANPAGE)
-option(WITH_SYSTEMD "install systemd target and service files" ON)
if(WITH_SYSTEMD)
add_subdirectory(systemd)
endif()
CHECK_TYPE_SIZE(__s16 __S16)
CHECK_TYPE_SIZE(__s32 __S32)
CHECK_TYPE_SIZE(__s64 __S64)
-set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h")
-CHECK_TYPE_SIZE("struct msghdr" MSGHDR)
unset(CMAKE_EXTRA_INCLUDE_FILES)
include(CheckSymbolExists)
util.cc
version.cc)
-if(HAVE_MSGHDR)
+if(WITH_SYSTEMD)
list(APPEND common_srcs
Journald.cc)
endif()
namespace ceph::logging {
-#ifdef HAVE_MSGHDR
+#ifdef WITH_SYSTEMD
namespace detail {
std::unique_ptr<detail::LogEntryEncoder> m_log_entry_encoder;
};
-#else // HAVE_MSGHDR
+#else // WITH_SYSTEMD
class JournaldLogger {
public:
}
};
-#endif // HAVE_MSGHDR
+#endif // WITH_SYSTEMD
} // ceph::logging
/* Define to 1 if the system has the type `__u8'. */
#cmakedefine HAVE___U8 1
-/* Define to 1 if the system has the type `msghdr` */
-#cmakedefine HAVE_MSGHDR 1
-
/* Define if you have res_nquery */
#cmakedefine HAVE_RES_NQUERY
/* define if cephfs enabled */
#cmakedefine WITH_CEPHFS
+/* define if systemed is enabled */
+#cmakedefine WITH_SYSTEMD
+
/*define if GSSAPI/KRB5 enabled */
#cmakedefine HAVE_GSSAPI
target_link_libraries(ceph_bench_log rt)
endif()
-if(HAVE_MSGHDR)
+if(WITH_SYSTEMD)
add_executable(ceph_bench_journald_logger
bench_journald_logger.cc)
target_link_libraries(ceph_bench_journald_logger ceph-common)
add_executable(unittest_allocate_unique test_allocate_unique.cc)
add_ceph_unittest(unittest_allocate_unique)
-if(HAVE_MSGHDR)
+if(WITH_SYSTEMD)
add_executable(unittest_journald_logger test_journald_logger.cc)
target_link_libraries(unittest_journald_logger ceph-common)
add_ceph_unittest(unittest_journald_logger)