baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.99k stars 886 forks source link

Support compiling under ARM64 environment using gcc #349

Open githubzilla opened 2 years ago

githubzilla commented 2 years ago

在Ubuntu:20.04 aarch64环境下使用cmake .. && make编译出错(gcc版本9.3.0),原因是sse4是gcc x86选项,在arm64上的gcc并不支持。所以在CMakeLists.txt加上cpu类型检查,在不是intel cpu的情况下不加sse4选项。

错误信息: c++: error: unrecognized command line option '-msse4' c++: error: unrecognized command line option '-msse4.2'