Closed ngzhian closed 3 years ago
There is cmake parameter SIMD_TEST_FLAGS to build Test application with additional options. For example:
cmake -B build/ -S prj/cmake/ -DSIMD_TEST_FLAGS="-mavx2"
I can't set additional options to Test application by default because it will be crash on machines without support of coresponding extensions.
Thanks, I missed that CMake parameter. I guess it is possible to detect supported extensions on the current machine and set the flags appropriately, but I'm not sure how. This parameter will work, thanks!
By default the test runs only build Base, without any support of SSE/AVX. I was slightly confused by this:
It looks like we hit this case https://github.com/ermig1979/Simd/blob/a51408c74f93c22652d57506b7909c0f3c59328a/prj/cmake/CMakeLists.txt#L172 and use
COMMON_CXX_FLAGS
which does not enable any extensions.What is the recommended way to build tests with support for, e.g. SSE4.1? Should it be to add the flag
-msse4.1
to that line in CMakeLists.txt?