cmake gcc target specific option mismatch

/usr/lib/gcc/x86_64-linux-gnu/8/include/tmmintrin.h:40:1: error: inlining failed in call to always_inline ‘__m128i _mm_hadd_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_hadd_epi16 (__m128i __X, __m128i __Y)
 ^~~~~~~~~~~~~~
In file included from /home/wangpan/work/gitnew/opencv_demo/demo/mibokeh_clut/util/bokeh_util.cpp:2:
/home/wangpan/work/gitnew/opencv_demo/demo/mibokeh_clut/util/../include/NEON_2_SSE.h:6462:27: note: called from here
     return _mm_hadd_epi16 (r16_1, r16_2);
            ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

 


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -mssse3")  //看有人说添加这个-mssse3参数,编译通过,但是我的不行
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -msse4.1")  //添加这行,编译成功

 

参考:https://blog.csdn.net/willib/article/details/52386087

https://stackoverflow.com/questions/47587561/gcc-compilation-error-inlining-failed-in-call-to-always-inline-even-after-set

你可能感兴趣的:(cmake笔记,linux命令)