set(datadir ${CEPH_INSTALL_DATADIR})
set(prefix ${CMAKE_INSTALL_PREFIX})
+configure_file(${CMAKE_SOURCE_DIR}/src/init-ceph.in
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph @ONLY)
+
+configure_file(ceph-post-file.in
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-post-file @ONLY)
+
+configure_file(ceph-crash.in
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crash @ONLY)
+
+# the src/.git_version file may be written out by make-dist; otherwise
+# we pull the git version from .git
+option(ENABLE_GIT_VERSION "build Ceph with git version string" ON)
+if(ENABLE_GIT_VERSION)
+ get_git_head_revision(GIT_REFSPEC CEPH_GIT_VER)
+ git_describe(CEPH_GIT_NICE_VER_WITH_V --always)
+ # remove leading 'v'
+ string(SUBSTRING ${CEPH_GIT_NICE_VER_WITH_V} 1 -1 CEPH_GIT_NICE_VER)
+ #if building from a source tarball via make-dist
+ if(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND")
+ message(STATUS "Ceph/.git directory not found, parsing ${CMAKE_CURRENT_SOURCE_DIR}/.git_version for CEPH_GIT_VER and CEPH_GIT_NICE_VER")
+ file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/.git_version CEPH_GIT_SHA_AND_TAG)
+ list(GET CEPH_GIT_SHA_AND_TAG 0 CEPH_GIT_VER)
+ list(GET CEPH_GIT_SHA_AND_TAG 1 CEPH_GIT_NICE_VER)
+ endif(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND")
+else(ENABLE_GIT_VERSION)
+ set(CEPH_GIT_VER "no_version")
+ set(CEPH_GIT_NICE_VER "Development")
+endif(ENABLE_GIT_VERSION)
+
+# the src/ceph_release file is 3 lines,
+# <release number, e.g. '12' for luminous>
+# <release name, e.g. 'luminous'>
+# <release type: 'dev' for x.0.z, 'rc' or x.1.z, or 'stable' or x.2.z>
+# note that the release name is semi-redundant and must match CEPH_RELEASE_*
+# definitions in include/rados.h and common/ceph_strings.c.
+file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/ceph_release CEPH_RELEASE_FILE)
+list(GET CEPH_RELEASE_FILE 0 CEPH_RELEASE)
+list(GET CEPH_RELEASE_FILE 1 CEPH_RELEASE_NAME)
+list(GET CEPH_RELEASE_FILE 2 CEPH_RELEASE_TYPE)
+
+configure_file(${CMAKE_SOURCE_DIR}/src/ceph.in
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY)
+
+# Common infrastructure
+configure_file(
+ ${CMAKE_SOURCE_DIR}/src/ceph_ver.h.in.cmake
+ ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h
+ @ONLY)
+
add_definitions(
-DHAVE_CONFIG_H
-D__CEPH__
list(APPEND EXTRALIBS gcov)
endif(${ENABLE_COVERAGE})
-set(GCOV_PREFIX_STRIP 4)
-
-# the src/.git_version file may be written out by make-dist; otherwise
-# we pull the git version from .git
-option(ENABLE_GIT_VERSION "build Ceph with git version string" ON)
-if(${ENABLE_GIT_VERSION})
- get_git_head_revision(GIT_REFSPEC CEPH_GIT_VER)
- git_describe(CEPH_GIT_NICE_VER_WITH_V --always)
- # remove leading 'v'
- string(SUBSTRING ${CEPH_GIT_NICE_VER_WITH_V} 1 -1 CEPH_GIT_NICE_VER)
- #if building from a source tarball via make-dist
- if(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND")
- message(STATUS "Ceph/.git directory not found, parsing ${CMAKE_CURRENT_SOURCE_DIR}/.git_version for CEPH_GIT_VER and CEPH_GIT_NICE_VER")
- file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/.git_version CEPH_GIT_SHA_AND_TAG)
- list(GET CEPH_GIT_SHA_AND_TAG 0 CEPH_GIT_VER)
- list(GET CEPH_GIT_SHA_AND_TAG 1 CEPH_GIT_NICE_VER)
- endif(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND")
-else(${ENABLE_GIT_VERSION})
- set(CEPH_GIT_VER "no_version")
- set(CEPH_GIT_NICE_VER "Development")
-endif(${ENABLE_GIT_VERSION})
-
-# the src/ceph_release file is 3 lines,
-# <release number, e.g. '12' for luminous>
-# <release name, e.g. 'luminous'>
-# <release type: 'dev' for x.0.z, 'rc' or x.1.z, or 'stable' or x.2.z>
-# note that the release name is semi-redundant and must match CEPH_RELEASE_*
-# definitions in include/rados.h and common/ceph_strings.c.
-file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/ceph_release CEPH_RELEASE_FILE)
-list(GET CEPH_RELEASE_FILE 0 CEPH_RELEASE)
-list(GET CEPH_RELEASE_FILE 1 CEPH_RELEASE_NAME)
-list(GET CEPH_RELEASE_FILE 2 CEPH_RELEASE_TYPE)
+if(WITH_TESTS)
+ set(GCOV_PREFIX_STRIP 4)
+ configure_file(${CMAKE_SOURCE_DIR}/src/ceph-coverage.in
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY)
+ configure_file(${CMAKE_SOURCE_DIR}/src/ceph-debugpack.in
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY)
+endif()
option(WITH_OCF "build OCF-compliant cluster resource agent" OFF)
if(WITH_OCF)
add_subdirectory(blkin/blkin-lib)
endif(WITH_BLKIN)
-# Common infrastructure
-configure_file(
- ${CMAKE_SOURCE_DIR}/src/ceph_ver.h.in.cmake
- ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h
- @ONLY)
-
set(mds_files)
list(APPEND mds_files
mds/MDSMap.cc
add_subdirectory(crypto)
-if(WITH_TESTS)
- configure_file(${CMAKE_SOURCE_DIR}/src/ceph-coverage.in
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY)
- configure_file(${CMAKE_SOURCE_DIR}/src/ceph-debugpack.in
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY)
-endif()
-
-configure_file(${CMAKE_SOURCE_DIR}/src/ceph.in
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY)
-
-configure_file(${CMAKE_SOURCE_DIR}/src/init-ceph.in
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph @ONLY)
-
-configure_file(ceph-post-file.in
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-post-file @ONLY)
-
-configure_file(ceph-crash.in
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crash @ONLY)
-
if(WITH_TESTS)
install(PROGRAMS
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack