summaryrefslogtreecommitdiffstats
path: root/src/erasure-code/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/erasure-code/CMakeLists.txt
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/erasure-code/CMakeLists.txt')
-rw-r--r--src/erasure-code/CMakeLists.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/erasure-code/CMakeLists.txt b/src/erasure-code/CMakeLists.txt
new file mode 100644
index 000000000..ec091f584
--- /dev/null
+++ b/src/erasure-code/CMakeLists.txt
@@ -0,0 +1,41 @@
+## erasure code plugins
+
+set(erasure_plugin_dir ${CEPH_INSTALL_PKGLIBDIR}/erasure-code)
+
+#jerasure subdir must be before shec so jerasure & neon obj libs are declared
+include_directories(SYSTEM jerasure/jerasure/include)
+include_directories(SYSTEM jerasure/gf-complete/include)
+include_directories(jerasure)
+
+# legacy jerasure flavors. these are left here for backward compatibility
+# and should be removed in future versions
+set(jerasure_legacy_flavors generic)
+if(HAVE_ARM)
+ list(APPEND jerasure_legacy_flavors neon)
+endif()
+if(HAVE_INTEL)
+ list(APPEND jerasure_legacy_flavors sse3 sse4)
+endif()
+
+add_subdirectory(jerasure)
+add_subdirectory(lrc)
+add_subdirectory(shec)
+add_subdirectory(clay)
+
+if(HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD)
+ add_subdirectory(isa)
+ set(EC_ISA_LIB ec_isa)
+endif()
+
+add_library(erasure_code STATIC ErasureCodePlugin.cc)
+target_link_libraries(erasure_code $<$<PLATFORM_ID:Windows>:dlfcn_win32>
+ ${CMAKE_DL_LIBS})
+
+add_library(erasure_code_objs OBJECT ErasureCode.cc)
+
+add_custom_target(erasure_code_plugins DEPENDS
+ ${EC_ISA_LIB}
+ ec_lrc
+ ec_jerasure
+ ec_shec
+ ec_clay)