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
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user