libwebp/cmake
James Zern 96099a79a8 cmake: fix per-file assembly flags
Since
a376e7b9 Fix compilation on windows and clang-cl+ninja.
the highest level assembly flag (/arch:AVX / -msse4.1) would be applied
to all assembly files. This could result in higher level instructions
being used which would defeat the runtime cpu detection check and could
result in a crash.

With this change -m style flags are used with clang-cl as it supports
them and allows the correct level to be set. With at least Visual
Studio 12 (2013)+ /arch is not necessary to build SSE2 or SSE4 code
unless a lesser /arch is forced so these flags are avoided. This matches
the nmake build.

For emscripten only sse2 and sse4.1 are tested (NEON will succeed in
being enabled, but fail to build). This is consistent with
the current behavior added in:
commit 36c81ff6a9

    WASM-SIMD: port 2 patches from rreverser@'s tree

    * Stop on first found SIMD version
    * Imply lower SSE version when higher is found

Bug: webp:488
Change-Id: I34d01274e5204a477b6b9f35ed566048a62b4c57
Tested: msvc 2013-2019 debug win32/x64 builds; clang-cl under 2019
2020-11-23 17:31:48 -08:00
..
config.h.in Remove AVX2 files. 2018-10-16 14:12:03 +02:00
cpu.cmake cmake: fix per-file assembly flags 2020-11-23 17:31:48 -08:00
deps.cmake webp_js: force WASM=0 option explicitly 2020-05-29 14:56:34 +02:00
WebPConfig.cmake.in Fix up CMake to create targets. 2018-07-25 14:04:18 +02:00