Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
set(object_format "elf64")
endif()
set(CMAKE_ASM_FLAGS "-f ${object_format}")
+ set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/nasm-wrapper)
+ if(NOT WIN32)
+ # The native tools might be located even when cross compiling, which
+ # might not work in this case (especially when targeting Windows).
+ include(CheckNasm)
+ check_nasm_support(${object_format}
+ HAVE_NASM_X64
+ HAVE_NASM_X64_AVX2
+ HAVE_NASM_X64_AVX512)
+ endif()
set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/yasm-wrapper)
if(NOT WIN32)
# The native tools might be located even when cross compiling, which
/* yasm can also build the isa-l:avx512 */
#cmakedefine HAVE_YASM_X64_AVX512
+/* we have a recent nasm and are x86_64 */
+#cmakedefine HAVE_NASM_X64
+
+/* nasm can also build the isa-l:avx2 */
+#cmakedefine HAVE_NASM_X64_AVX2
+
+/* nasm can also build the isa-l:avx512 */
+#cmakedefine HAVE_NASM_X64_AVX512
+
/* Define if isa-l is compiled for arm64 */
#cmakedefine HAVE_ARMV8_SIMD