]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crypto: Merge compilation of crypto accelerators under a single cmake. 19386/head
authorGanesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Fri, 27 Jul 2018 01:01:46 +0000 (18:01 -0700)
committerGanesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Fri, 19 Oct 2018 04:48:18 +0000 (21:48 -0700)
- Control ISA-L and QAT under a crypto makefile
- Allow conditional compile of QAT.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
src/crypto/CMakeLists.txt
src/crypto/isa-l/CMakeLists.txt
src/crypto/qat/CMakeLists.txt [new file with mode: 0644]

index ed8e108abd0f3f56a9546d472cc812ae69a8cc66..357ca66beed296d09804bc18bcd67ac14b8d7cac 100644 (file)
@@ -1,5 +1,10 @@
 add_custom_target(crypto_plugins)
+set(crypto_plugin_dir ${CMAKE_INSTALL_PKGLIBDIR}/crypto)
 
 if(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
   add_subdirectory(isa-l)
 endif()
+
+if(WITH_QAT)
+  add_subdirectory(qat)
+endif()
index 662dbdeba725a0dfba07aae4eaf50d7ba5e0661b..4ed888c2f0aaebe95cb41d1eb7d9332aa9893571 100644 (file)
@@ -24,7 +24,6 @@ set(isal_crypto_plugin_srcs
 
 add_library(isal_crypto_plugin_objs OBJECT ${isal_crypto_plugin_srcs})
 target_include_directories(isal_crypto_plugin_objs PRIVATE ${isal_dir}/include)
-set(isal_crypto_plugin_dir ${CMAKE_INSTALL_PKGLIBDIR}/crypto)
 
 if(HAVE_GOOD_YASM_ELF64)
 add_dependencies(crypto_plugins ceph_crypto_isal)
@@ -33,4 +32,4 @@ endif(HAVE_GOOD_YASM_ELF64)
 add_library(ceph_crypto_isal SHARED ${isal_crypto_plugin_srcs})
 target_include_directories(ceph_crypto_isal PRIVATE ${isal_dir}/include)
 set_target_properties(ceph_crypto_isal PROPERTIES VERSION 1.0.0 SOVERSION 1)
-install(TARGETS ceph_crypto_isal DESTINATION ${isal_crypto_plugin_dir})
+install(TARGETS ceph_crypto_isal DESTINATION ${crypto_plugin_dir})
diff --git a/src/crypto/qat/CMakeLists.txt b/src/crypto/qat/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ea4c1e2
--- /dev/null
@@ -0,0 +1,25 @@
+##
+# QAT wrapper for Ceph
+##
+
+# Build QAT driver library first
+include(BuildQatDrv)
+
+set(qat_crypto_plugin_srcs
+  qat_crypto_accel.cc
+  qat_crypto_plugin.cc
+  qcccrypto.cc)
+
+add_library(ceph_crypto_qat SHARED ${qat_crypto_plugin_srcs})
+add_dependencies(ceph_crypto_qat QatDrv)
+target_include_directories(ceph_crypto_qat PRIVATE
+  ${EXTRA_LIBS}
+  ${QatDrv_INCLUDE_DIRS})
+
+add_dependencies(crypto_plugins ceph_crypto_qat)
+
+target_link_libraries(ceph_crypto_qat
+  ${QatDrv_LIBRARIES})
+add_dependencies(crypto_plugins ceph_crypto_qat)
+set_target_properties(ceph_crypto_qat PROPERTIES VERSION 1.0.0 SOVERSION 1)
+install(TARGETS ceph_crypto_qat DESTINATION ${crypto_plugin_dir})