diff options
author | Fan Zhang <roy.fan.zhang@intel.com> | 2021-10-06 14:23:33 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-10-07 15:34:48 +0000 |
commit | f50aab0184544deb0fa3f8d126fd9a78206eddd6 (patch) | |
tree | 92e0ac4f9bd9f2cd2f9edfb3bd06c08dc6ea55fc /src/plugins/crypto_ipsecmb | |
parent | 0c56217a307556524cfc92a1aeb1eb72112271d2 (diff) |
build: fix ipsecmb version check
Type: fix
This patch fixes the chacha20-poly1305 support check in ipsecmb
engine build.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: I74b52a27f78a0f6a65c867dbd44a44a8f4a2ed60
Diffstat (limited to 'src/plugins/crypto_ipsecmb')
-rw-r--r-- | src/plugins/crypto_ipsecmb/CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/crypto_ipsecmb/CMakeLists.txt b/src/plugins/crypto_ipsecmb/CMakeLists.txt index fd9c97264d4..429343a9f3b 100644 --- a/src/plugins/crypto_ipsecmb/CMakeLists.txt +++ b/src/plugins/crypto_ipsecmb/CMakeLists.txt @@ -12,8 +12,6 @@ # 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() @@ -35,12 +33,14 @@ if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB) ${IPSECMB_LINK_FLAGS} ) - check_function_exists(ipsecmb_ops_chacha_poly HAVE_IPSECMB_CHACHA_POLY) + file(READ "${IPSECMB_INCLUDE_DIR}/intel-ipsec-mb.h" ipsecmb_header) + string(REGEX MATCH "IMB_VERSION_STR (\"+[0-9]+\\.[0-9]+\\.[0-9]+\")" _ ${ipsecmb_header}) + string(REPLACE "\"" "" IPSECMB_VERSION ${CMAKE_MATCH_1}) - if (HAVE_IPSECMB_CHACHA_POLY) + if (${IPSECMB_VERSION} VERSION_GREATER "0.54.0") add_definitions(-DHAVE_IPSECMB_CHACHA_POLY) else() - message(STATUS "Intel IPSecMB CHACHA support not found. Disabled") + message(STATUS "Intel IPSecMB ${IPSECMB_VERSION} does not support chacha20-poly1305. Disabled") endif() target_compile_options(crypto_ipsecmb_plugin PRIVATE "-march=silvermont" "-maes") |