Commit Graph

73 Commits

Author SHA1 Message Date
Matt Benjamin
1467637437 cmake: fix mis-matched arguments to if warning
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-06-10 15:09:45 -04:00
Kefu Chai
48a1f8eff5 cmake: always set ALLOCATOR at configure time
so it would be easier to figure out what allocator we are using later,
instead of poking around ${Foo}_FOUND variables.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-08 12:06:31 +08:00
Kefu Chai
9e768393bf cmake: s/BUILD_SHARED_LIBS/ENABLE_SHARED/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-06 12:42:02 +08:00
Kefu Chai
cf9a42c7cc cmake: use ENABLE_SHARED instead of BUILD_SHARED_LIBS
we decided to drop the static libraries from the *-dev debian packages.
so no more tricky changes for supporting creating both libraries.

* partially revert 1dbfb26: s/BUILD_SHARED_LIBS/ENABLE_SHARED/
 - add_library() command use BUILD_SHARED_LIBS as the default library
   type, and all intermediate libraries should static ones. it would
   cause unnecessary confusion if some developer uses add_library() without
   specifying the library type, and ends up with a .so. so we use our
   own setting variables for specifying the type of user facing libraries.
* revert ac47440
 - the BUILD_SHARED_LIBS setting is also populated to the gmock libraries,
   which should be compiled as static ones. otherwise the unit tests will
   crash on exit.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-04 12:57:19 +08:00
Kefu Chai
c1a37101ea cmake: project name should be "ceph"
so it would be easier to figure out paths, also
CMAKE_INSTALL_DOCDIR is composed using the PROJECT_NAME also.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-01 23:49:46 +08:00
Kefu Chai
1dbfb264ff cmake: s/ENABLE_SHARED/BUILD_SHARED_LIBS/
* BUILD_SHARED_LIB is a cmake variable respected by add_library().
  so we can simply expose it as an option instead of reinventing our own.
* and mark internal libraries as STATIC explicitly
* and add keyutil to librbd as secret.cc is using it. and secret.cc is
  linked into librbd.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-28 00:34:52 +08:00
Kefu Chai
a2706c7e16 cmake: revamp on lttng support
* Findlttng-ust.cmake: detect lttng-gen-tp, and make it a required var
* Findlttng-ust.cmake: fix the detection of lttng
* src/tracing/CMakeLists.txt:
  - do not put the generated header files into ${CMAKE_SOURCE_DIR}/src/tracing,
    instead we should put the generated files into ${PROJECT_BINARY_DIR}/include.
  - do not compile the tracing library using the .c files in the repo,
    instead, we should generate them at compile time using lttng-gen-tp,
    and compile the genererated .c files.
* CMakeLists.txt: make the lttng-use package REQUIRED if WITH_LTTNG=ON
* src/CMakeLists.txt: let librados depend on librados-tp if LTTNG is
  enabled: librados includes tracing/librados.h. the same applies to
  librbd, libos and libosd. cmake could deduce the dependencies if we
  add the lttng header files under include/tracing into the
  corresponding target, as the lttng header files are already listed
  as OUTPUT and GENERATED files, but this requires us to put all the
  involved targets in the same CMakeLists.txt. in this case, three
  CMakeLists.txts are impacted. so we create a new target for each
  lttng header, and let the impacted target depend on it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-27 19:54:42 +08:00
Kefu Chai
943d71ce92 Merge pull request #9156 from ceph/wip-cmake
cmake: Added #defines to config-h.in.cmake

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-05-27 11:37:52 +08:00
Ali Maredia
3a7111c310 cmake: remove verbose output from
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-05-26 17:26:50 -04:00
Ali Maredia
0ef09f32d4 cmake: Added #defines to config-h.in.cmake
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-05-26 17:26:48 -04:00
Kefu Chai
af902ec962 cmake: enable selinux support
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-16 23:09:06 +08:00
Kefu Chai
ef6b52373c cmake: build man pages
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-12 13:01:52 +08:00
Matt Benjamin
4df918ae8c cmake: <UPPERCASED_NAME>_FOUND in Findxio.cmake
For uniformity, upcase all these variables.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-05-03 17:36:59 -04:00
Ali Maredia
e0f400fdef cmake: test-ceph-helpers working
Moved all the libraries in CMAKE_BINARY_DIR/lib
and all the binaries in CMAKE_BINARY_DIR/bin. Set
various environment variables for test-ceph-helpers.
Put those variables throughout
qa/workunits/ceph-helpers.sh.

NOTE: This is a very rough draft of these fixes.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-04-14 20:48:19 -04:00
Kefu Chai
30ce32a67d cmake: pass RULE_LAUNCHER_* to cython
* pass the environment variables using `env` to pass environment
  varibles with space(s) in them to the COMMAND in add_custom_target.
  otherwise, cmake will try to quote the space with "\". this breaks the
  generated command line.
* add a comment for ccache to note that we do not expect ccache to speed
  up linking. we use it as the linker's launcher to workaround
  https://bugs.python.org/issue8027. to be specific,
  distutils.UnixCCompiler.link overwrites the first linker CLI's arg
  using the the first C++ compiler's CLI arg, if "env" is not used to
  launch the linker. this breaks the cythonization of our pybind APIs.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-04-11 00:46:31 +08:00
Ali Maredia
f02f1d17a6 cmake: Cython modules building with cmake
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-03-29 12:23:31 +01:00
Marcus Watts
5bf340ebae Update SSL support a bit.
Use cmake's FindOpenSSL.  Actually use the library definitions that
come out of it.  Also use the include path.  If SSL is disabled,
then build without any of this.  The result will be a version
of civetweb that includes openssl support using dlopen() - ie,
what we used to do.  This is probably a bit silly, and I hope
nobody actually expects to use it that way, but it's mostly harmless.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
2016-03-25 06:18:56 -04:00
Matt Benjamin
8e87ce74e7 cmake: add FindOpenSSL.cmake
Use find_package to enforce the dependency up front (we should be
using this pattern throughout top-level CMakeLists.txt).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-03-25 06:18:56 -04:00
Matt Benjamin
38fd3f190a rgw: LDAP pass-through authentication
Implement a new external authenticator based on LDAP and the
new external token format.

External LDAP auth now works, at least with openldap/X.500 style
naming and ldaps:// (SSL).

The latter is AD-friendly, but since AD uses dnattr=cn (IIRC)
everywhere, AD will need testing.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-03-12 09:57:12 -08:00
Brad Hubbard
11222c5c59 cmake: Remove duplicate find_package libcurl line.
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-03-07 14:12:31 +10:00
Ali Maredia
61026c872b cmake: Turned LTTng OFF
This is temporary, until a way to stop repetitive
unecessary generation of headerfiles is figured out.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-03-01 18:11:39 -05:00
Yehuda Sadeh
4d494d5b05 Merge remote-tracking branch 'origin/master' into wip-rgw-new-multisite
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>

Conflicts:
	src/CMakeLists.txt
	src/rgw/Makefile.am
	src/rgw/rgw_admin.cc
	src/rgw/rgw_common.h
	src/rgw/rgw_main.cc
	src/rgw/rgw_op.cc
	src/rgw/rgw_rados.h
	src/rgw/rgw_rest_s3.cc
	src/test/Makefile-client.am
2016-02-18 17:14:07 -08:00
Orit Wasserman
7942c93725 rgw: fix compilation with older boost versions that don't have asio coroutines
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2016-02-11 16:13:30 -08:00
Daniel Gryniewicz
d97718d4e6 CMake - add check for libcurl
Signed-off-by: Daniel Gryniewicz <dang@fprintf.net>
2016-02-11 16:13:16 -08:00
Kefu Chai
ef1573b171 cmake: disable warnings introduced by 457f023
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-02-09 21:20:06 -08:00
Sage Weil
a20134d94a Merge pull request #7349 from yuyuyu101/add-pwritev
osd: FileStore: use pwritev instead of lseek+writev

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2016-02-09 08:58:28 -05:00
Sage Weil
c87f3f3464 Merge pull request #7503 from tchaikov/wip-cmake-spdk
build: spdk submodule; cmake

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-02-05 09:16:59 -05:00
Kefu Chai
ecb1256968 cmake: enable NVMEDevice if SPDK is found
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-02-04 14:03:21 +08:00
Haomai Wang
aa7b5056ba cmake: add default pwritev support now
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-01-31 03:03:24 +08:00
Marcel Lauhoff
882672dcfa cmake: Add Graylog logging backend build support
Signed-off-by: Marcel Lauhoff <lauhoff@uni-mainz.de>
2016-01-29 15:33:36 +01:00
John Coyle
6d860ba46c cmake: musl libc does not implement backtrace. Added feature check and fallback to libexecinfo.
Signed-off-by: John Coyle <dx9err@gmail.com>
2016-01-29 08:50:46 -05:00
Kefu Chai
63d3d2bec7 cmake: link against libfuse if HAVE_LIBFUSE
* use ${FUSE_LIBRARIES} instead of "fuse" when referencing libfuse.
* do not compile FuseStore.cc if !HAVE_LIBFUSE.
* CMakeLists.txt: s/HAVE_FUSE/HAVE_LIBFUSE/, to match with the one
  defined for config.h.in.cmake, otherwise we need two vars:
  HAVE_LIBFUSE, and HAVE_FUSE

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-28 23:36:45 +08:00
Kefu Chai
5d91e6d398 Merge pull request #6875 from dx9/wip-cmake-ccache
cmake: support ccache via a WITH_CCACHE build option

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-01-28 15:35:16 +08:00
Loic Dachary
acd4314cf3 Merge pull request #7284 from ceph/wip-make-remove-libedit
makefile: remove libedit from libclient.la

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-01-25 13:15:48 +07:00
Kefu Chai
f5da159457 makefile: remove dependency on libedit
turns out we are not using it anymore

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-20 00:35:50 +08:00
Casey Bodley
4c9345bbab cmake: add missing check for HAVE_EXECINFO_H
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-01-18 14:13:19 -05:00
Kefu Chai
3ded44dc2d cmake: detect bzip2 and lz4 for rocksdb
* this change is the cmake port of 911e7a0.
  the rocksdb's Makefile will detect the installed libbz2 and libz4 by
  its own. if the building env happens to have these libraries installed,
  a link time dependency is introduced. so we are forced to link against
  them.
* do not REQUIRE BZip2 in cmake anymore
* only link against bzip2 if it is detected

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-07 04:33:06 -08:00
Ali Maredia
7151a47240 cmake: Findxio.cmake update Xio OFF by default
Option WITH_XIO now OFF but required by default,
Findxio.cmake now using
FIND_PACKAGE_HANDLE_STANDARD_ARGS.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
Ali Maredia
8ef0dfb30e cmake: Check for required Cython package
Added a FindCython.cmake, Cython is required.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
Ali Maredia
cbb71a4776 cmake: Boost libraries cleanup
Added components to Boost find_package, changed
libraries from boost_foo to ${Boost_FOO_LIBRARY}

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
Ali Maredia
330777051e cmake: Babeltrace detection supported
Babeltrace defaults to ON, Findbabeltrace.cmake &
BABELTRACE variables in config-h.in.cmake added.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
Ali Maredia
1aa7bc2ec4 cmake: LTTng functionality added
Set LTTNG option to ON by default, added
Findlttng.cmake, added CMakeLists.txt in
src/tracing that generates .h files using
lttng-gen-tp, added WITH_LTTNG to
config-h.in.cmake.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
Ali Maredia
a614c3b9c1 cmake: Updated allocator checking
Added a FindJeMalloc.cmake file, changed
allocator checking logic (tcmalloc is default),
replaced TCMALLOC_LIBS to ALLOC_LIBS, added
HAVE_LIB(ALLOCATOR) to config-h.in.cmake.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
Ali Maredia
b94f910cd1 cmake: kv dir and bluestore unittests
Added CMakeLists.txt in src/kv, replaced
os_mon_objs with kv_objs, linked libkv to os,
added HAVE_LIBROCKSDB to config-h.in.cmake,
tweaked rocksdb unittest, added bluestore
unittests, made rocksdb build with
add_custom_target instead of custom_command.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-01-05 15:42:06 -05:00
John Coyle
82c40b67f5 signal_handler: added support for using reentrant strsignal() implementations vs. sys_siglist[]
musl libc does not provide sys_siglist. It does provide a reentrant implementation of strsignal().

Added a cmake build option for using reentrant strsignal() impls instead of sys_siglist.

Signed-off-by: John Coyle <dx9err@gmail.com>
2015-12-09 13:08:59 -05:00
John Coyle
ae114aea03 cmake: support ccache via a WITH_CCACHE build option
When -DWITH_CCACHE=ON is specified, try to find and use ccache.

Signed-off-by: John Coyle <dx9err@gmail.com>
2015-12-09 13:01:37 -05:00
Ilya Dryomov
184914b8de cmake: define STRERROR_R_CHAR_P for GNU-specific strerror_r
This is what autotools does with AC_FUNC_STRERROR_R bit.  It takes us
from

    $ monmaptool --print nonexistant
    monmaptool: monmap file nonexistant
    monmaptool: couldn't open nonexistant: (2)

to

    $ monmaptool --print nonexistant
    monmaptool: monmap file nonexistant
    monmaptool: couldn't open nonexistant: (2) No such file or directory

on cmake - otherwise we end up using GNU-specific version as if it was
the POSIX version.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-12-01 15:07:48 +01:00
Yehuda Sadeh
53eda867bc Merge pull request #6292 from dx9/wip-12406-res_nquery
rgw/rgw_resolve: fallback to res_query when res_nquery not implemented

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-11-24 12:09:10 -08:00
John Coyle
cb2d4540d6 rgw/rgw_resolve: musl libc does not implement res_nquery. Added fallback to res_query.
res_query in musl libc is thread safe. Added a WITH_THREAD_SAFE_RES_QUERY cmake build option to disable default res_query lock.

Signed-off-by: John Coyle <dx9err@gmail.com>
2015-10-27 09:57:47 -04:00
John Coyle
e138e78574 common/MemoryModel: Alpine is a linux variant but does not implement mallinfo(). Added explicit feature check.
Signed-off-by: John Coyle <dx9err@gmail.com>
2015-10-18 20:48:38 -04:00