Win: Use YASM if it is in the PATH and NASM isn't

Previously, simd/CMakeLists.txt was hard-coded to use NASM, and it was
necessary to override the NASM variable in order to use YASM.  This
commit changes the behavior such that NASM is still preferred, but YASM
will be used if it is in the PATH and NASM isn't available.  This brings
the actual behavior in line with the behavior described in BUILDING.md.

Based on
b0799a1598

Closes #107
This commit is contained in:
DRC
2016-10-11 11:58:20 -05:00
parent 1ee329d617
commit 13e6b151b0

View File

@@ -1,6 +1,7 @@
if(NOT DEFINED NASM)
set(NASM nasm CACHE FILEPATH "Path to NASM/YASM executable")
find_program(NASM NAMES nasm yasm DOC "Path to NASM/YASM executable")
endif()
message(STATUS "NASM = ${NASM}")
if(SIMD_X86_64)
set(NAFLAGS -fwin64 -DWIN64 -D__x86_64__)