Closed uilianries closed 10 months ago
When using make to build intel-ipsec-mb, the Makefile has a check for nasm minimal version. However, it does not happen when running CMake.
make
This PR replaces #132 by checking the nasm version to 2.14 or higher.
The CMake variable CMAKE_ASM_NASM_COMPILER_VERSION is not provided directly (see CMake source code: https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeASM_NASMInformation.cmake) so we need to parse nasm output and collect its version.
CMAKE_ASM_NASM_COMPILER_VERSION
nasm
Once it's done, we just need to run cmake as usual:
$ cmake --build build/ -- Project Version: 1.4.0 -- AESNI emulation support... OFF -- SAFE_OPTIONS... ON -- SAFE_PARAM... ON -- SAFE_DATA... ON -- SAFE_LOOKUP... ON -- BUILD_SHARED_LIBS... ON -- CMAKE_GENERATOR... Unix Makefiles -- BUILD_TYPE... Release -- CMAKE_VERBOSE_MAKEFILE... OFF -- OPERATING SYSTEM... Linux -- NASM version: 2.14 -- LIB_INSTALL_DIR... /usr/local/lib -- INCLUDE_INSTALL_DIR... /usr/local/include -- MAN_INSTALL_DIR... /usr/local/man/man7 -- Configuring done -- Generating done -- Build files have been written to: /home/conan/project/build [ 0%] Building ASM_NASM object lib/CMakeFiles/IPSec_MB.dir/avx2_t1/aes192_gcm_by8_avx2.asm.o
The NASM version: 2.14 shows that nasm is present and it's version is parsed.
NASM version: 2.14
This has been merged in 9e17d6cad1f99e64f3534053a3ff096c46646058 so I'll close this PR. Thanks for your contribution 👍
Description
When using
make
to build intel-ipsec-mb, the Makefile has a check for nasm minimal version. However, it does not happen when running CMake.Affected parts
Motivation and Context
This PR replaces #132 by checking the nasm version to 2.14 or higher.
How Has This Been Tested?
The CMake variable
CMAKE_ASM_NASM_COMPILER_VERSION
is not provided directly (see CMake source code: https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeASM_NASMInformation.cmake) so we need to parsenasm
output and collect its version.Once it's done, we just need to run cmake as usual:
The
NASM version: 2.14
shows thatnasm
is present and it's version is parsed.Types of changes
Checklist: