Commit Graph

504 Commits

Author SHA1 Message Date
Deepika Upadhyay
4df43cff61 cmake: reorder find_package_handle_standard_arg for thrift
* Findthrift: thrift_FOUND fails to set if called before
  find_package_handle_standard_arg, hence reorder adding
  thrift::libthrift target after it

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 21:35:29 +05:30
Deepika Upadhyay
fcb1eb91c4 cmake: remove buildthrift methods
we use Findthrift.cmake method for adding thrift dependencies, the
cleanup 80e82686eb missed removing these
methods intended to buildthrift from source.

this address the missing failure due to ,
```
CMake Error at cmake/modules/BuildJaeger.cmake:61 (include):
  include could not find load file:

    Buildthrift
```
this fixes regression introduced by: 80e82686eb

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 21:25:56 +05:30
Deepika Upadhyay
a92a7aa236 cmake: change debian DESTDIR for installing jaeger deps
debian uses debian/tmp as destination dir for installing build files,
but since we are using common path($build_dir/external) available both
for rpm and debian based dependency installation, it becomes far more
complicated to maintain include/link path for these external projects.

elaborating on it:
path we are configuring for both rpm and debian installing including,
and linking of external librarires:
/build/ceph-17.0.0-5779-g928f9e55/obj-x86_64-linux-gnu/external/
debian appends DESTDIR to this path, and hence our predefined target
artificats cannot find correct path for external libs, I tried adding
ENV${DESTDIR} so that it could include correct external lib install
path, but it still cannot find them:

failed to link in case of:
-  install(DIRECTORY $ENV{DESTDIR}${CMAKE_BINARY_DIR}/external/include/jaegertracing
-                $ENV{DESTDIR}${CMAKE_BINARY_DIR}/external/include/opentracing
-          DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-  include_directories(SYSTEM ${CMAKE_INSTALL_INCLUDEDIR}/jaegertracing)
-  include_directories(SYSTEM ${CMAKE_INSTALL_INCLUDEDIR}/opentracing)

-- Installing: /build/ceph-17.0.0-5790-g6bc03cbd/debian/tmp/build/ceph-17.0.0-5790-g6bc03cbd/obj-x86_64-linux-gnu/external/include/jaegertracing/Tracer.h

cd /build/ceph-17.0.0-5790-g6bc03cbd/obj-x86_64-linux-gnu/src && /usr/bin/c++  -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -I/build/ceph-17.0.0-5790-g6bc03cbd/obj-x86_64-linux-gnu/src/include -I/build/ceph-17.0.0-5790-g6bc03cbd/src -isystem /build/ceph-17.0.0-5790-g6bc03cbd/obj-x86_64-linux-gnu/boost/include -isystem /build/ceph-17.0.0-5790-g6bc03cbd/obj-x86_64-linux-gnu/include -isystem /build/ceph-17.0.0-5790-g6bc03cbd/src/xxHash -isystem /build/ceph-17.0.0-5790-g6bc03cbd/src/rapidjson/include -isystem /build/ceph-17.0.0-5790-g6bc03cbd/src/include/jaegertracing -isystem /build/ceph-17.0.0-5790-g6bc03cbd/src/include/opentracing  -g -O2 -fdebug-prefix-map=/build/ceph-17.0.0-5790-g6bc03cbd=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -U_FORTIFY_SOURCE -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -fno-new-ttp-matching -fstack-protector-strong -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -std=c++17 -o CMakeFiles/common-objs.dir/mds/mdstypes.cc.o -c /build/ceph-17.0.0-5790-g6bc03cbd/src/mds/mdstypes.cc
In file included from /build/ceph-17.0.0-5790-g6bc03cbd/src/osd/OpRequest.h:21,
                 from /build/ceph-17.0.0-5790-g6bc03cbd/src/osd/OpRequest.cc:3:
/build/ceph-17.0.0-5790-g6bc03cbd/src/common/tracer.h:10:10: fatal error: jaegertracing/Tracer.h: No such file or directory

Since the install path is in our build environment for these librarires,
skipping DESTDIR looks to me hacky fix, but does the job.
with empty destdir:

-- Installing: /build/ceph-17.0.0-5791-gb97b9640/obj-x86_64-linux-gnu/external/include/jaegertracing/Tracer.h

cd /build/ceph-17.0.0-5791-gb97b9640/obj-x86_64-linux-gnu/src/mon && /usr/bin/c++  -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -I/build/ceph-17.0.0-5791-gb97b9640/obj-x86_64-linux-gnu/src/include -I/build/ceph-17.0.0-5791-gb97b9640/src -isystem /build/ceph-17.0.0-5791-gb97b9640/obj-x86_64-linux-gnu/boost/include -isystem /build/ceph-17.0.0-5791-gb97b9640/obj-x86_64-linux-gnu/include -isystem /build/ceph-17.0.0-5791-gb97b9640/src/xxHash -isystem /build/ceph-17.0.0-5791-gb97b9640/src/rapidjson/include -isystem /build/ceph-17.0.0-5791-gb97b9640/obj-x86_64-linux-gnu/external/include -isystem /build/ceph-17.0.0-5791-gb97b9640/src/rocksdb/include  -g -O2 -fdebug-prefix-map=/build/ceph-17.0.0-5791-gb97b9640=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -U_FORTIFY_SOURCE -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -fno-new-ttp-matching -fstack-protector-strong -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -std=c++17 -o CMakeFiles/mon.dir/MgrMonitor.cc.o -c /build/ceph-17.0.0-5791-gb97b9640/src/mon/MgrMonitor.cc

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 11:09:09 +05:30
Deepika Upadhyay
ffc3764606 cmake: adds BUILD_BYPRODUCT for external build jaegertracing libs
* adds BUILD_BYPRODUCT which tells ninja which library will be generated
after the build(needed for dependent build libs)

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 11:09:09 +05:30
Deepika Upadhyay
1e2278e158 cmake: minor reorder of boost path in jaeger build external projet
* Boost is a dependency for jaeger, to use the right version, we pass
ceph build boost path to cmake jaeger build step

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 11:08:17 +05:30
Deepika Upadhyay
2eea50800e cmake: target name Jaeger >> jaegertracing
since jaegertracing is the original target that jaeger submodule uses in
it's cmake, cmake build complained if named otherwise

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 11:02:18 +05:30
Deepika Upadhyay
f51480b223 cmake: move ExternalProjectHelper & IncludeJaeger to BuildJaeger
set_library_properties_for_external_project assists with setting right target
properties for all jaeger dependencies.
IncludeJaeger would take care of linking and creating these targets
having them spread out when they are highly coupled seems not optimal.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 11:01:08 +05:30
Deepika Upadhyay
84ad544433 cmake: add find_package(thrift) support for thrift 0.13
adds Findthrift.cmake which is used to find thrift 0.13, as a dependency
for building jaegertracing

* bump up submodule version for jaeger-client-cpp for thrift compiler
removal

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 10:59:48 +05:30
Deepika Upadhyay
80e82686eb ceph.spec, cmake, debian: use thrift 0.13+ from distro pkg
the change to build and ship libthift was added when we didn't have 0.13.0
version shipped via distro pkgs, now that centos 8 and F34 supports req.
version, we do not need to build and ship it with jaeger library.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 10:59:45 +05:30
Deepika Upadhyay
00f44782af cmake, ceph.spec, debian: use yaml-cpp >= 0.6
* since focal and centos both have yaml-cpp 0.6 available, which dropped
having boost as it's dependency, moving to 0.6 seems a good upgrade.

* cmake: delete Buildyaml, since distro suppilies v0.6 this is not needed

This fixes the build failure, as jaegertracing requires yaml-cpp v0.6+
```
Could NOT find yaml-cpp: Found unsuitable version "", but required is at
  least "0.5.1" (found yaml-cpp_LIBRARY-NOTFOUND)

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 10:58:08 +05:30
Deepika Upadhyay
4e0b4da1a2 cmake: update build<lib>.cmake for supporting ninja
* affects cmake builds for: yaml-cpp, thrift, jaeger, opentracing external
projects

changes done:
* artificat BUILD_BYPRODUCT which tells ninja which library will be generated
after the build(needed for dependent build libs)
* use cmake_command if `make` not found so that we use default generator, cmake
will identify and use ninja directly in this case.
* minor reorder of boost path in jaeger build external projet

fixes: https://tracker.ceph.com/issues/51029

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-06 14:22:28 +00:00
Kefu Chai
d2b0382ec6 cmake: stop detecting <experimental/filesystem>
since we've dropped the support of GCC older than v8.0, there is no need
to detect <experimental/filesystem>

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-09 23:25:22 +08:00
Kefu Chai
b6e6d15a28 cmake: require GCC-8.1 and up
for better C++17 support, for instance for a better std::filesystem
support.

the reason why 8.1 is required is that ubuntu focal provides GCC-8.1,
and RHEL/CentOS8 provides GCC-8.4.1. so we only test the build on
GCC-8.1 and up so far.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-09 23:25:22 +08:00
Kefu Chai
7577fec7fd cmake: increase the MAX_{LINK,COMPILE}_MEM
based on recent observation, quite a few C++ source file take
around more than 3.0GiB to compile. for instance,
test_mock_HttpClient.cc could take up to 6270MiB memory to compile.

so increase MAX_{LINK,COMPILE}_MEM accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-03 21:03:03 +08:00
Kefu Chai
b9e8015904 cmake/modules/FindSanitizers: prefer libasan.6
libasan.6 is shipped as part of GCC-11, so prefer it over older versions

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-24 16:19:37 +08:00
Casey Bodley
a335304042 rgw: remove the fcgi frontend
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2021-05-17 15:00:33 -04:00
Kefu Chai
078b30e1f1
Merge pull request #41166 from tchaikov/wip-cmake-cython-cflags
cmake: remove cflags from CC

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-05-08 21:17:19 +08:00
Rafał Wądołowski
c2c6678e48 cmake: Replace boost download url
Boost has moved downloads to JFrog Artifactory
https://www.boost.org/users/news/boost_has_moved_downloads_to_jfr.html

Signed-off-by: Rafał Wądołowski <rwadolowski@cloudferro.com>
2021-05-07 10:12:43 +02:00
Kefu Chai
1f6cf5e403 cmake: remove cflags from CC
this change make it more explicit how we override CC, CFLAGS and
CPPFLAGS:

* CC only for the compiler
* CFLAGS only for the flags consumed by C compiler
* CPPFLAGS only used for the preprocessor, it is used by both C and C++
  compilers.

this change does not address any specific test failure. it just
improves the correctness and readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-05 15:19:27 +08:00
Kefu Chai
d0858dbfb4 librados/librados_c: check .symver support using cmake
the __asm__(".asmver ..") is a support provided by the compiler, so
would be better to detect it by either checking the compiler identifer
or just try it out.

in this change, instead of checking the building platform, we check this
feature using check_c_source_compiles().

in future, we could support versioned symbols using function attriubte
or symbol tables or version-script.

on platform where symbol versioning is not supported, we might need to
go with a different approach.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-02 08:16:12 +08:00
Kefu Chai
fab337c1d0 common/compat: detect memset_s() using check_function_exists()
more robust this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-02 08:16:12 +08:00
Kefu Chai
d275875b0e cmake: check for empty string by its value
the behavior of cmake 3.17 is a little bit different as it consider

NOT _library STREQUAL ""

as true, if ${_library} is "".

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-02 08:15:15 +08:00
Kefu Chai
a06f8edeca common/pick_address: define in_addr_t if it is not defined
neither mingw not not have in_addr_t defined, see
https://docs.microsoft.com/en-us/windows/win32/api/winsock2/ns-winsock2-in_addr,
so define it if it is not defined.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-01 23:30:53 +08:00
Kefu Chai
8ba7087585
Merge pull request #41071 from tchaikov/wip-cmake-disable-vta
cmake: disable "variable tracking" when building rados python binding

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-05-01 09:09:05 +08:00
Kefu Chai
59624b0fd9
Merge pull request #41038 from tchaikov/wip-cmake-liburing
cmake: pass "CC" using configure when building liburing

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
2021-04-29 22:20:09 +08:00
Kefu Chai
c2b3f7f5e7 cmake: disable "variable tracking" when building rados python binding
to silence the warning like:

/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/rados/rados.c: In function '__pyx_pymod_exec_rados':
/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/rados/rados.c:78903:30: note: variable tracking size limit exceeded with '-fvar-tracking-assignments', retrying without
78903 | static CYTHON_SMALL_CODE int __pyx_pymod_exec_rados(PyObject *__pyx_pyinit_module)
      |                              ^~~~~~~~~~~~~~~~~~~~~~
cc: warning: /usr/bin/cc: linker input file unused because linking not done

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-29 00:11:33 +08:00
Yingxin Cheng
636ab08f26 cmake: bump to PMDK v1.10
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
2021-04-28 17:31:41 +08:00
Kefu Chai
e25c046f31 cmake: pass "CC" using configure when building liburing
since liburing's configure checks the CC and CXX env variables, let's
pass them when calling "configure". otherwise "make" still uses gcc and
g++ by default as they are specified in the "configure" script. this
also matches with the way how debian/rules calls "make".

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-27 13:36:23 +08:00
Kefu Chai
ad85af2ef8 cmake/modules/Findpmem: always set pmem_VERSION_STRING
before this change, `pmem_VERSION_STRING` is not set if it is not able
to fulfill the specified version requirement. the intention was to check
if the version is able to satisfy the requirement. but actually, passing
an empty `pmem_VERSION_STRING` to `find_package_handle_standard_args()`
as the option of `VERSION_VAR` does not fail this check. on the
contrary, it prints

-- Found pmem: pmem_pmemobj_INCLUDE_DIR;pmem_pmem_INCLUDE_DIR (Required
is at least version "1.17")

if we requires pmem 1.17, while the found version is, for instance,
1.10.

if the required version is 1.7, and the found version is 1.10, the
output from cmake is:

-- Found pmem: pmem_pmemobj_INCLUDE_DIR;pmem_pmem_INCLUDE_DIR (found
suitable version "1.10", minimum required is "1.7")

in this change, the version spec is not specified when calling
`pkg_check_modules()`. so, `PKG_${component}_VERSION` is always set.
and we can always delegate the version checking to
`find_package_handle_standard_args()`. please note, we use the lower
version returned by pkg-config if multiple components are required and
both pkg-config settings return their versions.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-26 16:38:09 +08:00
Kefu Chai
117838c91d
Merge pull request #40866 from hualongfeng/pmdk_in_dist
make-dist: add pmdk to dist tarball

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-04-15 16:43:28 +08:00
Feng Hualong
14c2a2e59f cmake: use src/pmdk for building pmdk if it exists
so we can build with pmdk enabled if the dist tarball
contains pmdk

Signed-off-by: Feng Hualong <hualong.feng@intel.com>
2021-04-15 10:40:06 +08:00
Kefu Chai
e09f8d7dd0
Merge pull request #40149 from tchaikov/wip-cmake-job-pool
cmake: use ninja job pool

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-04-14 15:06:50 +08:00
Kefu Chai
8c44876be4 cmake: s/HAVE_MSGHDR/WITH_SYSTEMD/
as FreeBSD also has msghdr but it does not have systemd, or
flags like MFD_ALLOW_SEALING, O_TMPFILE or F_SEAL_GROW. so
use WITH_SYSTEMD for enabling journald backend of logging system.

also move the option of "WITH_SYSTEMD" up so that the src/CMakeLists.txt
is able to see the variable of WITH_SYSTEMD defined by it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-08 16:58:50 +08:00
Kefu Chai
c6e8fc5933
Merge pull request #40487 from tchaikov/wip-boost-1.75
install-deps.sh: install boost 1.75

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-04-07 15:10:34 +08:00
Kefu Chai
80c4a1cd37 common: disable journald logging backend if struct msghdr is not found
* cmake/modules/CephChecks.cmake: detect the existence of struct msghdr,
  define HAVE_MSGHDR if it is found
* src/common/CMakeLists.txt: do not compile journald.cc if HAVE_MSGHDR
  is FALSE. as in that case, we cannot use sendmsg() to write to
  journald unix domain socket
* src/test/CMakeLists.txt, src/test/common/CMakeLists.txt: disable test
  exercising journald logging backend if HAVE_MSGHDR is not defined
* src/common/Journald.h: define a dummy JournaldLogger and a dummy
  JournaldClusterLogger when HAVE_MSGHDR is not defined, in order to
  minimize the change in Log.h and Log.cc, otherwise the source code of
  Log.h and Log.cc would be segmented into smaller chunks by
  `ifdef HAVE_MSGHDR` macros.
* src/include/config-h.in.cmake: define a new macro named
  HAVE_MSGHDR.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-06 14:46:33 +08:00
Kefu Chai
37a015a9ed cmake: dedup components when finding pmem
otherwise we always find libpmem twice if libpmem is explicitly
specified when find_package()

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-05 17:33:10 +08:00
Kefu Chai
89121189ac cmake,install-deps,make-dist: use boost 1.75
so we can use the latest boost

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-05 15:09:29 +08:00
Kefu Chai
7e1ef0c0c9 cmake: require libpmem 1.7
detect the libpmem libraries' version using pkg-config

please note, the version is not identical to the ones defined in
libpmem.h or libpmemobj/base.h

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-03 23:59:32 +08:00
Kefu Chai
6dfc80737d cmake: consolidate the find logic in Findpmem.cmake
less repeating this way

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-03 23:58:53 +08:00
Kefu Chai
bf56cddce5 cmake: use .pc for hints for finding pmem libraries
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-03 22:00:17 +08:00
Kefu Chai
16fd07244d cmake: allow use libzstd in system
since we are moving the test nodes from bionic to focal, we are able to
use the prebuilt libzstd libraries when running "make check". to speed
up the build and test, in this change:

* add FindZstd.cmake which allows us to use the libzstd in system
* extract BuildZstd.cmake for better readability
* add an option named "WITH_SYSTEM_ZSTD", which defaults to "OFF",
  so user can enable it on demand.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-31 12:53:39 +08:00
Kefu Chai
65776d3112 cmake: pass unparsed args to add_ceph_test()
this allows us to pass extra argument to the script or executable to
further customize its behavior when testing.

also fix all the callers of add_ceph_unittest(), as there is no need to
repeat the executable, which is also used as the name of the test.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-30 17:33:56 +08:00
Kefu Chai
1a422d4478 cmake: pass PARALLEL to add_ceph_unittest()
and parse it using cmake_parse_arguments(), more flexible this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-30 16:44:32 +08:00
Kefu Chai
6152076c22
Merge pull request #40336 from tchaikov/wip-cmake-fio
cmake: pass compile options by fio interface library

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-03-26 09:28:31 +08:00
Kefu Chai
47cec18613 cmake: use fixture for preparing venv
this change should allow us to decouple "ninja tests" from "ctest".
in other words, we can just run

ctest -R run-tox-python-common -V

without running "ninja tests" first. before this change

${name}-venv is added as a dependency of "tests" target.

after this change,

setup-venv-for-${name} is added as a test, which is in turn a test of
run-tox-${name}, so we can just

ctest -R run-tox-${name}

now for preparing the venv and then testing the tox test of ${name}.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-24 22:19:31 +08:00
Kefu Chai
c190fee53d cmake: pass compile options by fio interface library
for better readability and maintainability

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-23 16:25:47 +08:00
Kefu Chai
897fd990bf cmake: use ninja job pool
to limit the parallel level of compile jobs which consumes lots of memory
to compile and/or link.

compile following targets with heavy_compile_pool.

* unittest_librbd
* crimson*
* ceph-dencoder

some of the .cc files in the target above use up to 6 GiB memory to
compile.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-21 15:52:13 +08:00
Patrick Donnelly
f7fa3b50c1
libcephsqlite: rework architecture and backend
This is a complete rewrite on top of SimpleRADOSStriper as well as the
API. The VFS is now a loadable extension as well.

Fixes: https://tracker.ceph.com/issues/40609
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:55 -07:00
Patrick Donnelly
eb52c869d5
cmake: improve build inst for cephsqlite
Notably, find SQLite and build the test code.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:54 -07:00
Kefu Chai
33d2964ae2 cmake: adapt FindBoost.cmake to our needs
the vanilla FindBoost.cmake pulled from cmake has couple assumptions
which do not hold in our environment. so address them case by case.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-19 20:35:51 +08:00