Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wip cmake make check #7912

Merged
merged 59 commits into from Apr 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a7bd5e4
cmake: Reorganized test dir, added cmake functions
alimaredia Jan 26, 2016
e0f400f
cmake: test-ceph-helpers working
alimaredia Jan 11, 2016
59568e5
cmake: encode-decode-non-regression.sh passing in cmake
alimaredia Jan 15, 2016
3186c00
cmake: moved tests into test/osd dir
alimaredia Jan 12, 2016
5d4d3ff
cmake: shell scripts in test/mon passing in cmake
alimaredia Jan 12, 2016
9be9060
cmake: shell scripts in test/encoding passing in cmake
alimaredia Jan 15, 2016
f65c87a
cmake: moved tests into test/common dir
alimaredia Jan 28, 2016
3a10843
cmake: moved tests into test/crush dir
alimaredia Jan 28, 2016
84c999a
cmake: moved tests into test/fs dir
alimaredia Jan 28, 2016
83ff750
cmake: moved tests into test/librados dir
alimaredia Jan 28, 2016
3fffaa6
cmake: moved tests into test/libradosstriper dir
alimaredia Jan 28, 2016
852276d
cmake: moved tests into test/mds dir
alimaredia Jan 28, 2016
74ea1f9
cmake: moved tests into test/objectstore dir
alimaredia Jan 28, 2016
ef8b113
cmake: moved tests into test/pybind dir
alimaredia Jan 28, 2016
025f552
cmake: moved tests into test/os dir
alimaredia Jan 30, 2016
c1f94df
cmake: moved tests into test/bench dir
alimaredia Feb 1, 2016
6a791fa
cmake: moved tests into test/cls_hello dir
alimaredia Feb 1, 2016
0e851de
cmake: moved tests into test/cls_lock dir
alimaredia Feb 1, 2016
de64f82
cmake: moved tests into test/cls_log dir
alimaredia Feb 2, 2016
7271c96
cmake: moved tests into test/cls_numops dir
alimaredia Feb 2, 2016
fe673ea
cmake: moved tests into test/cls_rbd dir
alimaredia Feb 2, 2016
2636c16
cmake: moved tests into test/cls_refcount dir
alimaredia Feb 2, 2016
521b07b
cmake: moved tests into test/cls_replica_log dir
alimaredia Feb 2, 2016
8da608d
cmake: moved tests into test/cls_rgw dir
alimaredia Feb 2, 2016
e2b0f6f
cmake: moved tests into test/cls_statelog dir
alimaredia Feb 2, 2016
d50478f
cmake: moved tests into test/cls_version dir
alimaredia Feb 2, 2016
02d508c
cmake: moved tests into test/compressor dir
alimaredia Feb 2, 2016
997291e
cmake: moved tests into test/filestore dir
alimaredia Feb 2, 2016
99d66ca
cmake: moved tests into test/journal dir
alimaredia Feb 2, 2016
eb8e49c
cmake: moved tests into test/libcephfs dir
alimaredia Feb 2, 2016
99d3436
cmake: moved tests into test/librados_test_stub dir
alimaredia Feb 2, 2016
cfffdf6
cmake: moved tests into test/messenger dir
alimaredia Feb 2, 2016
e7c1459
cmake: moved tests into test/msgr dir
alimaredia Feb 2, 2016
4492439
cmake: moved tests into test/ObjectMap dir
alimaredia Feb 2, 2016
798b821
cmake: moved tests into test/osdc dir
alimaredia Feb 2, 2016
803def3
cmake: moved tests into test/rgw dir
alimaredia Feb 2, 2016
54eb382
cmake: moved tests into test/system dir
alimaredia Feb 2, 2016
8e3e3f4
cmake: librbd fixes
alimaredia Feb 2, 2016
d189270
cmake: working on rados-striper.sh test
alimaredia Jan 13, 2016
005e4b4
cmake: working on cephtool-test-rados.sh test
alimaredia Jan 14, 2016
cf24535
cmake: cephtool-test-rados/mds/osd passing in cmake
alimaredia Jan 14, 2016
f43dd0f
cmake: unittest_bufferlist passing in cmake
alimaredia Jan 15, 2016
6596373
cmake: ceph_objectstore_tool.py test passing
alimaredia Jan 26, 2016
1c8cd00
cmake: erasure-code tests passing
alimaredia Jan 13, 2016
49da534
cmake: test_objectstore_memstore.sh test passing
alimaredia Jan 28, 2016
dd0ac99
unittest_blkdev: absolute path for cmake make check
alimaredia Feb 3, 2016
fd978ce
unittest_journal: got rid of relative paths
alimaredia Feb 4, 2016
cfcbe21
cmake: erasure-decode-non-regression.sh passing
alimaredia Feb 5, 2016
de97f67
cmake: Protect againist getenv returning nullptr
alimaredia Feb 12, 2016
9288e98
cmake: test_pidfile.sh test passing
alimaredia Feb 12, 2016
21ec89f
cmake: Added an absolute path for libs
alimaredia Feb 12, 2016
60e5fa9
cmake: Added rbd_mirror targets
alimaredia Feb 15, 2016
a7b6c01
cmake: Add librgw_file tests
alimaredia Feb 17, 2016
4fc06be
cmake: Building ceph-disk from source code
alimaredia Feb 15, 2016
b4de745
cmake: Building ceph-detect-init from source code
alimaredia Feb 15, 2016
56c37ea
cmake: CMake environment variables added to automake
alimaredia Feb 17, 2016
e0bda0b
cmake: remove repeat OSD.cc
alimaredia Mar 16, 2016
8ddfcb1
cmake: Add cython_modules to `make check`
alimaredia Apr 4, 2016
28b91f2
cmake: link ceph_test_rados_api_list against libglobal
tchaikov Apr 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -46,6 +46,11 @@ link_directories(
${LEVELDB_PREFIX}/lib
)

#put all the libs and binaries in one place
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

#Check Includes
include(CheckIncludeFiles)
include(CheckIncludeFileCXX)
Expand Down
25 changes: 25 additions & 0 deletions cmake/modules/AddCephTest.cmake
@@ -0,0 +1,25 @@
#AddCephTest is a module for adding tests to the "make check" target which runs CTest

#adds makes target/script into a test, test to check target, sets necessary environment variables
function(add_ceph_test test_name test_path)
add_test(NAME ${test_name} COMMAND ${test_path})
add_dependencies(check ${test_name})
set_property(TEST
${test_name}
PROPERTY ENVIRONMENT
CEPH_ROOT=${CMAKE_SOURCE_DIR}
CEPH_BIN=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
CEPH_LIB=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
CEPH_BUILD_DIR=${CMAKE_BINARY_DIR}
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib
PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src:$ENV{PATH}
PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules/lib.linux-x86_64-2.7:${CMAKE_SOURCE_DIR}/src/pybind)
endfunction()

#sets uniform compiler flags and link libraries
function(add_ceph_unittest unittest_name unittest_path)
add_ceph_test(${unittest_name} ${unittest_path})
target_link_libraries(${unittest_name} ${UNITTEST_LIBS})
set_target_properties(${unittest_name} PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
endfunction()

13 changes: 8 additions & 5 deletions qa/workunits/ceph-helpers.sh
Expand Up @@ -360,8 +360,8 @@ function run_mon() {
--mon-data-avail-crit=1 \
--paxos-propose-interval=0.1 \
--osd-crush-chooseleaf-type=0 \
--erasure-code-dir=.libs \
--plugin-dir=.libs \
--erasure-code-dir=$CEPH_LIB \
--plugin-dir=$CEPH_LIB \
--debug-mon 20 \
--debug-ms 20 \
--debug-paxos 20 \
Expand Down Expand Up @@ -594,9 +594,9 @@ function activate_osd() {
ceph_args+=" --osd-scrub-load-threshold=2000"
ceph_args+=" --osd-data=$osd_data"
ceph_args+=" --chdir="
ceph_args+=" --erasure-code-dir=.libs"
ceph_args+=" --plugin-dir=.libs"
ceph_args+=" --osd-class-dir=.libs"
ceph_args+=" --erasure-code-dir=$CEPH_LIB"
ceph_args+=" --plugin-dir=$CEPH_LIB"
ceph_args+=" --osd-class-dir=$CEPH_LIB"
ceph_args+=" --run-dir=$dir"
ceph_args+=" --debug-osd=20"
ceph_args+=" --log-file=$dir/\$name.log"
Expand Down Expand Up @@ -654,6 +654,7 @@ function wait_for_osd() {

status=1
for ((i=0; i < $TIMEOUT; i++)); do
echo $i
if ! ceph osd dump | grep "osd.$id $state"; then
sleep 1
else
Expand Down Expand Up @@ -1446,6 +1447,7 @@ function main() {
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '

export PATH=${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv/bin:${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv/bin:.:$PATH # make sure program from sources are prefered
#export PATH=$CEPH_ROOT/src/ceph-disk/virtualenv/bin:$CEPH_ROOT/src/ceph-detect-init/virtualenv/bin:.:$PATH # make sure program from sources are prefered

export CEPH_CONF=/dev/null
unset CEPH_ARGS
Expand All @@ -1468,6 +1470,7 @@ function run_tests() {
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '

export PATH=${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv/bin:${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv/bin:.:$PATH # make sure program from sources are prefered
#export PATH=$CEPH_ROOT/src/ceph-disk/virtualenv/bin:$CEPH_ROOT/src/ceph-detect-init/virtualenv/bin:.:$PATH # make sure program from sources are prefered

export CEPH_MON="127.0.0.1:7109" # git grep '\<7109\>' : there must be only one
export CEPH_ARGS
Expand Down
4 changes: 2 additions & 2 deletions qa/workunits/cephtool/test.sh
@@ -1,6 +1,6 @@
#!/bin/bash -x

source $(dirname $0)/../ceph-helpers.sh
source $CEPH_ROOT/qa/workunits/ceph-helpers.sh

set -e
set -o functrace
Expand Down Expand Up @@ -1078,7 +1078,7 @@ function test_mon_osd()
ceph osd set $f
ceph osd unset $f
done
ceph osd set sortbitwise # new backends can't handle nibblewise
ceph osd set sortbitwise # new backends cant handle nibblewise
expect_false ceph osd set bogus
expect_false ceph osd unset bogus

Expand Down
2 changes: 1 addition & 1 deletion qa/workunits/erasure-code/encode-decode-non-regression.sh
Expand Up @@ -15,7 +15,7 @@
# GNU Library Public License for more details.
#
: ${CORPUS:=https://github.com/ceph/ceph-erasure-code-corpus.git}
: ${DIRECTORY:=../ceph-erasure-code-corpus}
: ${DIRECTORY:=$CEPH_ROOT/ceph-erasure-code-corpus}

# when running from sources, the current directory must have precedence
export PATH=:$PATH
Expand Down
134 changes: 48 additions & 86 deletions src/CMakeLists.txt
Expand Up @@ -525,11 +525,13 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/
DESTINATION ${PYTHON_INSTDIR})

add_subdirectory(pybind)
add_subdirectory(ceph-disk)
add_subdirectory(ceph-detect-init)

## dencoder
set(dencoder_srcs
test/encoding/ceph_dencoder.cc
krbd.cc
$<TARGET_OBJECTS:krbd_objs>
common/secret.c
common/TextTable.cc
)
Expand Down Expand Up @@ -741,7 +743,6 @@ set(osd_srcs
osd/ECBackend.cc
osd/ECTransaction.cc
osd/PGBackend.cc
osd/OSD.cc
osd/OSDCap.cc
osd/Watch.cc
osd/ClassHandler.cc
Expand Down Expand Up @@ -840,11 +841,7 @@ target_link_libraries(cephfstool common ${EXTRALIBS})
set_target_properties(cephfstool PROPERTIES OUTPUT_NAME cephfs)
install(TARGETS cephfstool DESTINATION bin)

set(compressor_srcs
compressor/Compressor.cc
compressor/AsyncCompressor.cc)
add_library(compressor STATIC ${compressor_srcs})
target_link_libraries(compressor common snappy)
add_subdirectory(compressor)

add_executable(ceph-client-debug tools/ceph-client-debug.cc)
target_link_libraries(ceph-client-debug cephfs librados global common)
Expand Down Expand Up @@ -885,19 +882,19 @@ target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS})
install(TARGETS ceph-authtool DESTINATION bin)

configure_file(${CMAKE_SOURCE_DIR}/src/ceph-coverage.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/src/ceph-debugpack.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/src/ceph.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/src/ceph-crush-location.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crush-location @ONLY)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crush-location @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/src/init-ceph.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph @ONLY)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph @ONLY)

install(PROGRAMS
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph
Expand Down Expand Up @@ -996,81 +993,46 @@ set(journal_srcs
journal/Utils.cc)
add_library(journal ${journal_srcs})

add_library(krbd_objs OBJECT krbd.cc)

if(${WITH_RBD})
set(librbd_srcs
krbd.cc
common/ContextCompletion.cc
librbd/AioCompletion.cc
librbd/AioImageRequest.cc
librbd/AioImageRequestWQ.cc
librbd/AioObjectRequest.cc
librbd/AsyncObjectThrottle.cc
librbd/AsyncOperation.cc
librbd/AsyncRequest.cc
librbd/CopyupRequest.cc
librbd/DiffIterate.cc
librbd/ExclusiveLock.cc
librbd/ImageCtx.cc
librbd/ImageState.cc
librbd/ImageWatcher.cc
librbd/internal.cc
librbd/Journal.cc
librbd/librbd.cc
librbd/LibrbdAdminSocketHook.cc
librbd/LibrbdWriteback.cc
librbd/MirroringWatcher.cc
librbd/ObjectMap.cc
librbd/ObjectWatcher.cc
librbd/Operations.cc
librbd/Utils.cc
librbd/exclusive_lock/AcquireRequest.cc
librbd/exclusive_lock/ReleaseRequest.cc
librbd/exclusive_lock/StandardPolicy.cc
librbd/image/CloseRequest.cc
librbd/image/OpenRequest.cc
librbd/image/RefreshParentRequest.cc
librbd/image/RefreshRequest.cc
librbd/image/SetSnapRequest.cc
librbd/image_watcher/Notifier.cc
librbd/image_watcher/NotifyLockOwner.cc
librbd/journal/Replay.cc
librbd/journal/StandardPolicy.cc
librbd/journal/Types.cc
librbd/mirroring_watcher/Types.cc
librbd/object_map/InvalidateRequest.cc
librbd/object_map/LockRequest.cc
librbd/object_map/Request.cc
librbd/object_map/RefreshRequest.cc
librbd/object_map/ResizeRequest.cc
librbd/object_map/SnapshotCreateRequest.cc
librbd/object_map/SnapshotRemoveRequest.cc
librbd/object_map/SnapshotRollbackRequest.cc
librbd/object_map/UnlockRequest.cc
librbd/object_map/UpdateRequest.cc
librbd/operation/FlattenRequest.cc
librbd/operation/RebuildObjectMapRequest.cc
librbd/operation/RenameRequest.cc
librbd/operation/Request.cc
librbd/operation/ResizeRequest.cc
librbd/operation/SnapshotCreateRequest.cc
librbd/operation/SnapshotProtectRequest.cc
librbd/operation/SnapshotRemoveRequest.cc
librbd/operation/SnapshotRenameRequest.cc
librbd/operation/SnapshotRollbackRequest.cc
librbd/operation/SnapshotUnprotectRequest.cc
librbd/operation/TrimRequest.cc
librbd/WatchNotifyTypes.cc)
add_library(librbd ${CEPH_SHARED} ${librbd_srcs}
$<TARGET_OBJECTS:osdc_rbd_objs>
$<TARGET_OBJECTS:common_util_obj>)
target_link_libraries(librbd LINK_PRIVATE librados common journal
cls_lock_client cls_rbd_client cls_journal_client udev
${CMAKE_DL_LIBS})
if(${ENABLE_SHARED})
set_target_properties(librbd PROPERTIES VERSION "1.0.0" SOVERSION "1"
OUTPUT_NAME rbd)
endif(${ENABLE_SHARED})
install(TARGETS librados librbd DESTINATION lib)
add_subdirectory(librbd)

set(rbd_mirror_internal
tools/rbd_mirror/ClusterWatcher.cc
tools/rbd_mirror/ImageReplayer.cc
tools/rbd_mirror/ImageSync.cc
tools/rbd_mirror/Mirror.cc
tools/rbd_mirror/PoolWatcher.cc
tools/rbd_mirror/Replayer.cc
tools/rbd_mirror/Threads.cc
tools/rbd_mirror/types.cc
tools/rbd_mirror/image_replayer/BootstrapRequest.cc
tools/rbd_mirror/image_replayer/CloseImageRequest.cc
tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc
tools/rbd_mirror/image_sync/ImageCopyRequest.cc
tools/rbd_mirror/image_sync/ObjectCopyRequest.cc
tools/rbd_mirror/image_sync/SnapshotCopyRequest.cc
tools/rbd_mirror/image_sync/SyncPointCreateRequest.cc
tools/rbd_mirror/image_sync/SyncPointPruneRequest.cc)
add_library(rbd_mirror_internal STATIC ${rbd_mirror_internal})

add_executable(rbd-mirror
tools/rbd_mirror/main.cc
common/ContextCompletion.cc)
target_link_libraries(rbd-mirror
rbd_mirror_internal
rbd_internal
rbd_api
rbd_types
journal
librados
osdc
cls_rbd_client
cls_lock_client
cls_journal_client
global)

set(rbd_srcs
tools/rbd/rbd.cc
tools/rbd/ArgumentTypes.cc
Expand Down
6 changes: 6 additions & 0 deletions src/Makefile.am
Expand Up @@ -177,6 +177,12 @@ if WITH_LTTNG
TESTS_ENVIRONMENT = LD_PRELOAD=liblttng-ust-fork.so; export LD_PRELOAD; echo "LD_PRELOAD=$${LD_PRELOAD}";
endif

AM_TESTS_ENVIRONMENT = export CEPH_ROOT="$(abs_top_srcdir)";
AM_TESTS_ENVIRONMENT += export CEPH_BUILD_DIR="$(abs_srcdir)";
AM_TESTS_ENVIRONMENT += export CEPH_BIN="$(abs_srcdir)";
AM_TESTS_ENVIRONMENT += export CEPH_LIB="$(abs_srcdir)/.libs";
AM_TESTS_ENVIRONMENT += export PATH="$(abs_srcdir):$$PATH";

# base targets

core-daemons: ceph-mon ceph-osd ceph-mds radosgw
Expand Down
6 changes: 6 additions & 0 deletions src/ceph-detect-init/CMakeLists.txt
@@ -0,0 +1,6 @@
add_custom_target(ceph-detect-init
COMMAND
${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh ${CMAKE_BINARY_DIR}/ceph-detect-init-virtualenv &&
virtualenv/bin/pip install --no-index --use-wheel --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-detect-init
COMMENT "ceph-detect-init is being created")
6 changes: 6 additions & 0 deletions src/ceph-disk/CMakeLists.txt
@@ -0,0 +1,6 @@
add_custom_target(ceph-disk
COMMAND
${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh ${CMAKE_BINARY_DIR}/ceph-disk-virtualenv &&
virtualenv/bin/pip install --no-index --use-wheel --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-disk
COMMENT "ceph-disk is being created")
7 changes: 7 additions & 0 deletions src/compressor/CMakeLists.txt
@@ -1,3 +1,10 @@

set(compressor_srcs
Compressor.cc
AsyncCompressor.cc)
add_library(compressor STATIC ${compressor_srcs})
target_link_libraries(compressor common snappy ${CMAKE_DL_LIBS})

## compressor plugins

set(compressorlibdir ${LIBRARY_OUTPUT_PATH}/compressor)
Expand Down
3 changes: 2 additions & 1 deletion src/compressor/snappy/CMakeLists.txt
@@ -1,7 +1,8 @@
# snappy

# absolute path because $snappy_sources used outside of this directory
set(snappy_sources
CompressionPluginSnappy.cc
${CMAKE_SOURCE_DIR}/src/compressor/snappy/CompressionPluginSnappy.cc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get around the absolute path thing by making this an object library?

$<TARGET_OBJECTS:compressor_objs>
)

Expand Down
6 changes: 3 additions & 3 deletions src/erasure-code/jerasure/CMakeLists.txt
Expand Up @@ -31,7 +31,7 @@ add_library(ec_jerasure_generic SHARED
$<TARGET_OBJECTS:erasure_code_objs>
)
add_dependencies(ec_jerasure_generic ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_jerasure_generic ${EXTRALIBS})
target_link_libraries(ec_jerasure_generic crush ${EXTRALIBS})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't understand why the erasure code libs would depend on crush. if you're getting linker errors without this, we should figure out what's pulling crush stuff in

set_target_properties(ec_jerasure_generic PROPERTIES VERSION 2.0.0 SOVERSION 2)
install(TARGETS ec_jerasure_generic DESTINATION lib/erasure-code)

Expand Down Expand Up @@ -68,7 +68,7 @@ if(INTEL_SSE)
$<TARGET_OBJECTS:erasure_code_objs>
)
add_dependencies(ec_jerasure_sse3 ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_jerasure_sse3 ${EXTRALIBS})
target_link_libraries(ec_jerasure_sse3 crush ${EXTRALIBS})
set_target_properties(ec_jerasure_sse3 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE3_FLAGS})
install(TARGETS ec_jerasure_sse3 DESTINATION lib/erasure-code)
Expand All @@ -82,7 +82,7 @@ if(INTEL_SSE4_1)
$<TARGET_OBJECTS:erasure_code_objs>
)
add_dependencies(ec_jerasure_sse4 ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_jerasure_sse4 ${EXTRALIBS})
target_link_libraries(ec_jerasure_sse4 crush ${EXTRALIBS})
set_target_properties(ec_jerasure_sse4 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE4_FLAGS})
install(TARGETS ec_jerasure_sse4 DESTINATION lib/erasure-code)
Expand Down
3 changes: 2 additions & 1 deletion src/erasure-code/lrc/CMakeLists.txt
Expand Up @@ -4,10 +4,11 @@ set(lrc_srcs
ErasureCodePluginLrc.cc
ErasureCodeLrc.cc
$<TARGET_OBJECTS:erasure_code_objs>
${CMAKE_SOURCE_DIR}/src/common/str_map.cc
)

add_library(ec_lrc SHARED ${lrc_srcs})
add_dependencies(ec_lrc ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_lrc json_spirit)
target_link_libraries(ec_lrc crush json_spirit)
set_target_properties(ec_lrc PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS ec_lrc DESTINATION lib/erasure-code)
4 changes: 2 additions & 2 deletions src/erasure-code/shec/CMakeLists.txt
Expand Up @@ -42,7 +42,7 @@ if(INTEL_SSE)
$<TARGET_OBJECTS:jerasure_objs>
$<TARGET_OBJECTS:shec_objs>)
add_dependencies(ec_shec_sse3 ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_shec_sse3 ${EXTRALIBS})
target_link_libraries(ec_shec_sse3 crush ${EXTRALIBS})
set_target_properties(ec_shec_sse3 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE3_FLAGS})
install(TARGETS ec_shec_sse3 DESTINATION lib/erasure-code)
Expand All @@ -54,7 +54,7 @@ if(INTEL_SSE4_1)
$<TARGET_OBJECTS:jerasure_objs>
$<TARGET_OBJECTS:shec_objs>)
add_dependencies(ec_shec_sse4 ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_shec_sse4 ${EXTRALIBS})
target_link_libraries(ec_shec_sse4 crush ${EXTRALIBS})
set_target_properties(ec_shec_sse4 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE4_FLAGS})
install(TARGETS ec_shec_sse4 DESTINATION lib/erasure-code)
Expand Down