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

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值