cmake_minimum_required(VERSION 2.8.11)
project(ceph)
-set(VERSION 12.2.0)
+set(VERSION 12.2.7)
if(POLICY CMP0046)
# Tweak policies (this one disables "missing" dependency warning)
CHECK_FUNCTION_EXISTS(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP)
CHECK_FUNCTION_EXISTS(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
CHECK_FUNCTION_EXISTS(pthread_getname_np HAVE_PTHREAD_GETNAME_NP)
+CHECK_FUNCTION_EXISTS(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
CHECK_FUNCTION_EXISTS(eventfd HAVE_EVENTFD)
CHECK_FUNCTION_EXISTS(getprogname HAVE_GETPROGNAME)
include_directories(src/blkin/blkin-lib)
endif(WITH_BLKIN)
+option(WITH_BOOST_CONTEXT "Enable boost::asio stackful coroutines" ON)
+if(WITH_BOOST_CONTEXT)
+ set(HAVE_BOOST_CONTEXT ON)
+endif()
+
#option for RGW
option(WITH_RADOSGW "Rados Gateway is enabled" ON)
option(WITH_RADOSGW_FCGI_FRONTEND "Rados Gateway's FCGI frontend is enabled" OFF)
if(WITH_RADOSGW_FCGI_FRONTEND)
find_package(fcgi REQUIRED)
endif()
+ if(WITH_RADOSGW_BEAST_FRONTEND AND NOT WITH_BOOST_CONTEXT)
+ message(WARNING "disabling WITH_RADOSGW_BEAST_FRONTEND, which depends on WITH_BOOST_CONTEXT")
+ set(WITH_RADOSGW_BEAST_FRONTEND OFF)
+ endif()
endif(WITH_RADOSGW)
message(STATUS "Looking for openssl anyways, because radosgw selected")
find_package(OpenSSL)
endif()
+# https://curl.haxx.se/docs/install.html mentions the
+# configure flags for various ssl backends
+ execute_process(
+ COMMAND
+ "sh" "-c"
+ "curl-config --configure | grep with-ssl"
+ RESULT_VARIABLE NO_CURL_SSL_LINK
+ ERROR_VARIABLE CURL_CONFIG_ERRORS
+ )
+ if (CURL_CONFIG_ERRORS)
+ message(WARNING "unable to run curl-config; rgw cannot make ssl requests to external systems reliably")
+ endif()
+ find_package(OpenSSL)
if (OPENSSL_FOUND)
+ if (NOT NO_CURL_SSL_LINK)
+ message(STATUS "libcurl is linked with openssl: explicitly setting locks")
+ set(WITH_CURL_OPENSSL ON)
+ endif() # CURL_SSL_LINK
execute_process(
COMMAND
"sh" "-c"
message(STATUS "crypto soname: ${LIBCRYPTO_SONAME}")
else()
message(WARNING "ssl not found: rgw civetweb may fail to dlopen libssl libcrypto")
- endif()
+ endif() # OPENSSL_FOUND
endif (WITH_RADOSGW)
#option for CephFS
if(WITH_MGR)
list(APPEND BOOST_COMPONENTS python)
endif()
-
-if(WITH_RADOSGW_BEAST_FRONTEND)
- list(APPEND BOOST_COMPONENTS coroutine context)
+if(WITH_BOOST_CONTEXT)
+ list(APPEND BOOST_COMPONENTS context coroutine)
endif()
set(Boost_USE_MULTITHREADED ON)
else()
set(Boost_USE_STATIC_LIBS ON)
endif()
- find_package(Boost 1.61 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
+ find_package(Boost 1.66 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
else()
set(BOOST_J 1 CACHE STRING
"max jobs for Boost build") # override w/-DBOOST_J=<n>
set(Boost_USE_STATIC_LIBS ON)
include(BuildBoost)
- build_boost(1.63
+ build_boost(1.66
COMPONENTS ${BOOST_COMPONENTS} ${BOOST_HEADER_COMPONENTS})
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
endif()
add_subdirectory(systemd)
endif()
+if(LINUX)
+ add_subdirectory(etc/sysctl)
+endif()
+
include(CTags)
option(CTAG_EXCLUDES "Exclude files/directories when running ctag.")
add_tags(ctags