aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/crypto_ipsecmb/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/crypto_ipsecmb/CMakeLists.txt')
-rw-r--r--src/plugins/crypto_ipsecmb/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/crypto_ipsecmb/CMakeLists.txt b/src/plugins/crypto_ipsecmb/CMakeLists.txt
index 981a045262e..fd9c97264d4 100644
--- a/src/plugins/crypto_ipsecmb/CMakeLists.txt
+++ b/src/plugins/crypto_ipsecmb/CMakeLists.txt
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+include (CheckFunctionExists)
+
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
return()
endif()
@@ -33,6 +35,14 @@ if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB)
${IPSECMB_LINK_FLAGS}
)
+ check_function_exists(ipsecmb_ops_chacha_poly HAVE_IPSECMB_CHACHA_POLY)
+
+ if (HAVE_IPSECMB_CHACHA_POLY)
+ add_definitions(-DHAVE_IPSECMB_CHACHA_POLY)
+ else()
+ message(STATUS "Intel IPSecMB CHACHA support not found. Disabled")
+ endif()
+
target_compile_options(crypto_ipsecmb_plugin PRIVATE "-march=silvermont" "-maes")
message(STATUS "Intel IPSecMB found: ${IPSECMB_INCLUDE_DIR}")
else()