Without this, when targeting x86, the compiler may not enable sse2
by default without -msse2 switch and therefore leaves WEBP_USE_SSE2
undefined and the SSE2 procedure won't be built.
Change-Id: If983df5cd12c962cf153094468fb549ec3f2c89b
using the defaults present in 0.6.13 and setting
--first-comment-is-literal to avoid reflowing the copyright block and
--max-subgroups-hwrap 3 (default is 2) to avoid making some short set()
statements multi-line.
Change-Id: I3d90c025b5b2bb353046f4da19b8e442a044b902
This can be tested by running:
cmake ../ -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_EXTRAS=OFF
Bug: webp:612
Change-Id: Ie06d8f0535676d6d31ff0047ff7a6c026e16118e
These were picked up when matching autoconf's default checks and aren't
useful except to compare the generated config.h. Removing them speeds up
cmake, especially on windows where creating new processes is slow.
Change-Id: Ie891aad0a809af16357168d2ff7fd65922ee4011
when WEBP_USE_THREAD=1; this is necessary after:
0d1b9bc4 WEBP_DEP_LIBRARIES: use Threads::Threads
fixes:
CMake Error at WebPTargets.cmake:76 (set_target_properties):
The link interface of target "WebP::webp" contains:
Threads::Threads
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Bug: webp:583
Change-Id: I19633bcceccacb95be06aa9610512127f3c288a6
Fixed: webp:583
using the defaults present in 0.6.13 and setting
--first-comment-is-literal to avoid reflowing the copyright block and
--max-subgroups-hwrap 3 (default is 2) to avoid making some short set()
statements multi-line.
Change-Id: I77ec1f05a819f09c0143d6069c56b6e771ac6a37
Between 3.17.0 and 3.18.2 check_cxx_compiler_flag() sets a normal
variable at parent scope while check_cxx_source_compiles() continues to
set an internal cache variable, so we unset both to avoid the failure /
success state persisting between checks.
This was fixed in 3.18.3 [1], but regressed shortly afterward [2];
currently seen with 3.20.0 installed via homebrew.
[1] https://gitlab.kitware.com/cmake/cmake/-/issues/21207
[2]
90dead024c CheckCompilerFlag: unified way to check compiler flags per language
Change-Id: I57282f89b07a9cfd85aca7569380f7d115c0b3cf
this should be the full path to the installed headers to be added to the
client code's search path, e.g., /usr/local/include when including
<webp/decode.h>
Bug: webp:509
Change-Id: I756249876d8de421c9a33513221fb635157560ef
this controls the config.h define of the same name and matches the
behavior of configure's --disable-threading
Bug: webp:502
Change-Id: Id135bbf4e6b3c9900e2b4f4f7ab744b3457ce41c
Also fix the variables: we need to check for PTHREAD_PRIO_INHERIT
and PTHREAD_CREATE_JOINABLE (not PTHREAD_CREATE_UNDETACHED) and
internally use HAVE_PTHREAD_PRIO_INHERIT and PTHREAD_CREATE_JOINABLE
(and not HAVE_PTHREAD_CREATE_JOINABLE).
cmake/config.h.in actually had the right variables.
BUG=webp:498
Change-Id: Ibf6cf854337cea5781a74316024f8ff4960366d7
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
- Add `-msimd128` to flags to actually enable WebAssembly SIMD
when performing SIMD detection. It's currently required in
addition to `-msse*` / `-mfpu=neon` flags which only perform
translation of corresponding intrinsics to Wasm SIMD ones.
See a discussion at emscripten-core/emscripten#12714 for
automating this and making easier in the future.
- Remove compilation branch that prevented definitions of
`WEBP_USE_SSE` and `WEBP_USE_NEON` on Emscripten even when
SIMD support was detected at compile-time.
- Add an implementation of `VP8GetCPUInfo` for Emscripten which
uses static `WEBP_USE_*` flags to determine if a corresponding
SIMD instruction is supported. This is because Wasm doesn't
have proper feature detection (yet) and requires making separate
build for SIMD version anyway.
Change-Id: I77592081b91fd0e4cbc9242f5600ce905184f506
https://github.com/cheshirekow/cmake_format
A complete row of # is replaced by only one,
so add a space after the first one to keep it.
Change-Id: I367749353a555c89c717f1939220699e43ecab2c
It is still redefined, but to the same constant,
hence no more warning as mentioned on BUG=webp:358
Change-Id: I80a834c139d5d60cd693d468b0e2ea399729ab3e
- some image libraries define _INCLUDE_DIR and not INCLUDE_DIRS.
- CMakePushCheckState is a non-destructive way of changing the
CMAKE_REQUIRED_* variables.
Change-Id: I7d318a0ddf9754a5c047f47ba1713f9f94e1ec1c
GIF find_package only locates the header and library, it doesn't fail
compile tests when detecting the version, but falls back to 3 (as of at
least cmake 3.7.2). Make sure the library links to avoid incorrect
detection when cross compiling.
Change-Id: I0224180bbdf800ab261a9333236730b23c006e69
this avoids the result being cached in a common variable causing
potentially incorrect results in future tests and improves the logging
output
BUG=webp:351
Change-Id: I4b3110beec38f505fc8f835c3ea689a7d81a36bb
This is duplicating code from compiler flag checking that was once
added (then reverted to CMake) as the problem seem to be on the
clang side as detailed in:
http://public.kitware.com/Bug/view.php?id=13194
I also tried to remove a similar warning with pthreads but there
is also an issue on the clang side:
https://llvm.org/bugs/show_bug.cgi?id=7798
Change-Id: I5b0061f0f71e49b493c5ee0c98f70533c28164bd
WEBP_HAVE_FLAG_LOCAL -> WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG} this will
include the flag being tested in the output:
-- Performing Test WEBP_HAVE_FLAG_NEON
Change-Id: I1c0a143a857b16e4eb1fcf8b23c176380a5fef29
This will well isolate contributions for original code,
generated code and SIMD (especially for Android).
Change-Id: Ie47664decc7f43c2f57260a72cab951c347281a7
The goal is not to replace our autotools configuration, but to
provide a minimal CMake file that can build the lib, cwebp and
dwebp.
Change-Id: I3be343bd698d118c5f00172449d232d87e868f23