summaryrefslogtreecommitdiffstats
path: root/cmake (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cmake: remove cppcheck and iwyu targetsKefu Chai2020-05-132-53/+0
| | | | | | | these targets are not used by any other targets, and are not integrated with CI. so let's drop them. Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge pull request #34535 from changchengx/refine_build_liburingKefu Chai2020-04-182-0/+49
|\ | | | | | | | | cmake: refactor liburing support Reviewed-by: Kefu Chai <kchai@redhat.com>
| * cmake: use cmake module to integrate liburingChangcheng Liu2020-04-172-0/+49
| | | | | | | | | | | | | | | | | | 1. WITH_LIBURING is used to set HAVE_LIBURING to decide use liburing in KernelDevice or not. 2. WITH_SYSTEM_LIBURING is to choose use system installed liburing or build the liburing from source code. Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
* | cmake: detect fuse3 as wellKefu Chai2020-04-171-2/+7
| | | | | | | | | | Fixes: https://tracker.ceph.com/issues/44891 Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: check for FUSE versionKefu Chai2020-04-171-9/+23
| | | | | | | | | | | | and refactor FindFUSE.cmake a little bit to conditionalize OSX support Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: link against FUSE::FUSEKefu Chai2020-04-171-0/+11
| | | | | | | | | | | | instead of specifying the include directory and linkage separately Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: rename Findfuse.cmake to FindFUSE.cmakeKefu Chai2020-04-171-1/+1
|/ | | | | | | so its name is consistent with upstream name, and with the variables exposed by FindFUSE.cmake. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: check $top_srcdir/.git directlyKefu Chai2020-04-081-14/+7
| | | | | | | | | | | in 0437adc33a8b83847ed36666971b5ea4d88a4901, we stop right before reaching $top_srcdir, but we should stop at its parent directory. in this change, instead of trying to be smart and to walk all the way up to the root directory or $top_srcdir, we just check $top_srcdir/.git directly, as we just know it's there or it does not exist at all. Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge pull request #34369 from smithfarm/wip-43895Kefu Chai2020-04-081-2/+3
|\ | | | | | | | | cmake: really stop at top of source code tree Reviewed-by: Kefu Chai <kchai@redhat.com>
| * cmake: really stop at top of source code treeNathan Cutler2020-04-031-2/+3
| | | | | | | | | | | | | | | | | | Previously, we were recursing right up to / Patch submitted by Tony Davies via https://tracker.ceph.com Fixes: https://tracker.ceph.com/issues/43895 Signed-off-by: Tony Davies <anthony.t.davies@gmail.com>
* | cmake: specify CC when compiling pmemKefu Chai2020-04-031-16/+16
| | | | | | | | | | | | | | | | | | make always assume that `cc` is available. but we cannot ensure this, and furthermore, we need to use the compiler specified by user. so specify `CC` variable when compiling pmem. and reindent the code to fix the formatting. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: do not use $(MAKE) in Buildpmem.cmakeKefu Chai2020-04-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | we cannot assume that we are using `make` as the cmake generatator, for instance, if ninja is used, `$(MAKE)` won't be substituted by ninja. so we need to check if Make is used as generator, if that's the case, we can just use `$(MAKE)` so we can benefit from the job control of `make`, otherwise, `make` is used, because currently, PMDK uses Makefile to build. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: add find_make() functionKefu Chai2020-04-033-22/+21
|/ | | | | | | | it's a shorthand for finding "make" or "gmake" (for FreeBSD), and set the path to the executable and the command to use in the generated "Makefile" or whatever build script generated by cmake. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: Don't enable BOOST_USE_VALGRIND when not requestedAdam C. Emerson2020-03-211-1/+1
| | | | | | | We were adding the define without support in the library if WITH_BOOST_VALGRIND was turned off. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* build: Add WITH_BOOST_VALGRIND optionAdam C. Emerson2020-03-201-0/+7
| | | | | | | | To build Boost.Context (and other libraries) with support to allow them to be valground usefully, and to include the define to link against them. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* Merge pull request #33256 from tchaikov/wip-cmake-caresKefu Chai2020-02-211-1/+1
|\ | | | | | | | | cmake: should expose ${C-ARES_BINARY_DIR} from c-ares Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
| * cmake: should expose ${C-ARES_BINARY_DIR} from c-aresKefu Chai2020-02-131-1/+1
| | | | | | | | | | | | | | as it's public header `ares.h` includes `ares_build.h`, which is generated in the build directory. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: [win32] Fix rocksdb cross compilingLucian Petrut2020-02-191-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to cross compile rocksdb using mingw, we'll have to do the following: * pass on specified toolchain files * pass the CMAKE_PREFIX_PATH. We'll have to replace the ";" separator with something else (we went with "!"), otherwise CMake won't be able to properly handle the command arguments * pass on the received LZ4 lib location since it cannot be properly detected when cross compiling. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* | cmake: [win32] Update cmake filesLucian Petrut2020-02-192-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll update the cmake files in order to be able to build ceph components for Windows targets. Cross compiling using MINGW is the easiest approach for now. Subsequently, we'll add support for Clang and MSVC. This patch provides the following changes: * include winsock2.h, which provides ntohl on Windows * avoid unsupported compiler flags when using msvc * add a custom toolchain file for mingw * update install command for ceph-common in order to work with mingw * avoid running test sample when cross compiling * link against the ws_32 lib * set argeted Windows version * skip yasm checks when targeting Windows * allow multiple redefinitions when using mingw, picking the first one. this is a workaround for a mingw TLS bug: https://sourceforge.net/p/mingw-w64/bugs/816/ Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* | Merge pull request #32693 from CongMinYin/update-pmdk-versionKefu Chai2020-02-131-7/+7
|\ \ | |/ |/| | | | | cmake: Update pmdk version to 1.7 Reviewed-by: Kefu Chai <kchai@redhat.com>
| * cmake: Update pmdk version to 1.7Yin Congmin2020-02-131-7/+7
| | | | | | | | | | | | nvml is renamed to pmdk and upgrading to 1.7 to fix gcc9 build issue Signed-off-by: Yin, Congmin <congmin.yin@intel.com>
* | cmake: Improve test for 16-byte atomic support on IBM ZUlrich Weigand2020-01-231-7/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d1b9d14324586d02dc6c8dd0a9bdf4b98ae16416 added a check for 16-byte atomics without library support on IBM Z. Unfortunately it turns out this test only works correctly when the test case is built without optimization. (This is normally true, but it may not be the case when passing explicit CXXFLAGS to cmake.) The underlying reason is that GCC may choose to use either an inline implementation of the 16-byte atomics or library calls, depending on whether or not it is able to prove the atomic variable is properly aligned. At -O0 it is never able to prove that, but at higher optimization levels it depends on the complexity of the expression (in particular, whether GCC can track down the definition of the underlying object). As the test case uses a very simple expression, it may happen that this test can be built without requiring library support, but some of the "real" uses of atomics in Ceph code cannot. This defeats the whole purpose of the test at configure time. Fixed by making the access pattern in the test more complex, so that the test fails even at high optimization levels. Fixes: https://tracker.ceph.com/issues/43747 Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
* CMake - Workaround set Boost_component_FOUNDDaniel Gryniewicz2020-01-081-0/+1
| | | | | | | | | | | | BuildBoost.cmake (used when we're building the submodule) doesn't provide parity with FindBoost.cmake (used with system Boost). Specifically, it doesn't set the _FOUND variables for the various components, making it hard to depend on finding those features. Set Boost_<component>_FOUND for all the components we're building in BuildBoost.cmake to make using these variables possible. Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
* cmake: build boost v1.72 instead of v1.67Kefu Chai2019-12-233-53/+3
| | | | | | so we can drop two patches which are already included by v1.72 Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: update FindBoost.cmake for 1.72Kefu Chai2019-12-221-11/+24
| | | | | | | | adapted from https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake commit e51232b739b3eeae642be8a7e89079f7c2e8c1b2 Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake/Boost: Fix python3 versionKotresh HR2019-12-191-1/+1
| | | | Signed-off-by: Kotresh HR <khiremat@redhat.com>
* cmake: drop Find{Python,Python2}.cmakeKefu Chai2019-12-193-415/+2
| | | | | | since we are python3 only, there is no need to check Python2 anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
* src,qa: install python bindings into lib/cython_modules/lib.3Kefu Chai2019-12-192-3/+3
| | | | | | instead of checking for the WITH_PYTHON* options, just hardwire to lib.3 Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: drop WITH_PYTHON2 optionKefu Chai2019-12-194-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | * drop WITH_PYTHON2 option * print warning message if WITH_PYTHON3 is disabled * drop MGR_PYTHON_VERSION option, as we don't support use different python version for python binding and ceph-mgr embedded python interpreter anymore. as before switching to python3-only build, we can build python3 and python2 python bindings, and ceph-mgr can use either of them. but after switching to python3-only build, ceph-mgr has to use whatever python version used to build python binding. * move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr and python binding will share this option. * hardware ${PYTHON_VERSION} to 3 * hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3 * only build boost library with python3 * s/Python_EXECUTABLE/Python3_EXECUTABLE/ * update the build scripts and packagings accordingly * rename all cython${PYTHON_VERSION}_* targets to cython_* * update distutils_install_module() so it does not take python_version parameter anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: CMAKE_ROLE defaults to "PROJECT"Kefu Chai2019-12-191-0/+4
| | | | | | | | | so we can use exported targets like "Python3::Python", which is defined only if CMAKE_ROLE is "PROJECT". but this global property was introduced by CMake 3.14, but the minimum required version of CMake is 3.10.2 in Ceph project at this moment. let's set it if it's not defined. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: check version of librdkafkaKefu Chai2019-12-151-11/+25
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: silence messages when cppcheck/IWYU is not foundKefu Chai2019-12-102-5/+1
| | | | | | | | | * remove messages spit when these tools are not found they are not necessary for building Ceph. and the messages in the cmake output are distracting. * fix a typo Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: do not use CMP0093 unless it is supportedKefu Chai2019-12-031-6/+8
| | | | | | | | CMake CMP0093 was introduced by CMake 3.15, but we only require CMake v3.10.2. so use the old `Boost_VERSION_MACRO` variable by default, unless specified otherwise. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: do not use CMP0074 unless it is supportedKefu Chai2019-12-031-3/+7
| | | | | | | CMake CMP0074 was introduced by CMake 3.12, but we only require CMake v3.10.2. so default to check `Boost_ROOT` unless specified otherwise. Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge pull request #31317 from wjwithagen/wjw-update-FindBoost.cmakeKefu Chai2019-12-021-356/+474
|\ | | | | | | | | cmake: update FindBoost.cmake for 1.71 Reviewed-by: Kefu Chai <kchai@redhat.com>
| * cmake: update FindBoost.cmake for 1.71Willem Jan Withagen2019-11-201-356/+474
| | | | | | | | | | | | This comes from cmake v 3.15.3 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
* | Merge pull request #31841 from rosinL/wip-support-dpdk-numaKefu Chai2019-12-023-3/+30
|\ \ | | | | | | | | | | | | cmake: Add dpdk numa support Reviewed-by: Kefu Chai <kchai@redhat.com>
| * | cmake: Add shared library as dpdk dependencyluo rixin2019-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | librte_eal.a refers to libpthread.so and libdl.so, and libceph-common.so refers to librte_eal.a. Many test application link libceph-common.so without linking pthread, it will cause link error. Such as unittest_interval_set, target_link_libraries (unittest_interval_set ceph-common) Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
| * | cmake: Add dpdk numa supportChunsong Feng2019-11-283-3/+30
| |/ | | | | | | | | | | | | | | | | Find and link the numa library for DPDK. Fixes: https://tracker.ceph.com/issues/42275 Signed-off-by: Hu Ye <yehu5@huawei.com> Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
* | Merge PR #31781 into masterSage Weil2019-11-263-3/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * refs/pull/31781/head: cmake/modules: look for GNU make first instead of BSD make cmake: support parallel build for rocksdb Reviewed-by: Willem Jan Withagen <wjw@digiware.nl> Reviewed-by: Kefu Chai <kchai@redhat.com>
| * | cmake/modules: look for GNU make first instead of BSD makeDeepika Upadhyay2019-11-252-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | * BuildDPDK.cmake, BuildSPDK.cmake: * give priority to build with gmake * throw error if make not found Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
| * | cmake: support parallel build for rocksdbDeepika Upadhyay2019-11-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | * cmake/modules/BuildRocksDB.cmake: if "make" detected use concurrent processing, by passing the jobserver to sub-make using `$(MAKE)` Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
* | | Merge PR #31579 into masterSage Weil2019-11-262-0/+57
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * refs/pull/31579/head: cmake: add cppcheck and iwyu static analysis targets Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
| * | | cmake: add cppcheck and iwyu static analysis targetsYuval Lifshitz2019-11-182-0/+57
| | | | | | | | | | | | | | | | Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
* | | | Merge pull request #30960 from yuvalif/wip-yuval-add-kafka-notif-endpointCasey Bodley2019-11-211-0/+19
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | rgw/pubsub: add kafka notification endpoint Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
| * | | rgw/pubsub: add kafka notification endpointYuval Lifshitz2019-11-051-0/+19
| |/ / | | | | | | | | | Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
* | / cmake: detect librt for POSIX time functionsKefu Chai2019-11-141-0/+7
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | per clock_gettime(3), > On POSIX systems on which these functions are available, the symbol > _POSIX_TIMERS is defined in <unistd.h> to a value greater than 0. and > Most systems require the program be linked with the librt library to > use these functions. so, we should detect this symbol and link against librt for using these functions. in this change, librt is linked for checking the existence of clock_gettime(), if it exists. RT_LIBRARY is defined. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | Merge pull request #31544 from ifed01/wip-ifed-gettid2Kefu Chai2019-11-132-1/+2
|\ \ | | | | | | | | | | | | test/fio: bump to fio-3.15 Reviewed-by: Kefu Chai <kchai@redhat.com>
| * | cmake: detect gettid() presenseIgor Fedotov2019-11-121-0/+1
| | | | | | | | | | | | Signed-off-by: Igor Fedotov <ifedotov@suse.com>
| * | test/fio: bump to fio 3.15Igor Fedotov2019-11-121-1/+1
| |/ | | | | | | Signed-off-by: Igor Fedotov <ifedotov@suse.com>