Vertical-Beach / ByteTrack-cpp

C++ implementation of ByteTrack that does not include an object detection algorithm.
MIT License
150 stars 29 forks source link

Setting `-march=native` causes problems with clang #4

Closed derpda closed 2 years ago

derpda commented 2 years ago

First of all thank you for putting together this library, specifically without the attached object detection.

Issue

When cross-compiling this project with clang 12.0.9 for Android arm64-v8a, the compiler option -march=native set here https://github.com/Vertical-Beach/ByteTrack-cpp/blob/e6ee5a1485bedd24e2b8d6411be5d8fef63a6c3e/CMakeLists.txt#L10 causes compiler check https://github.com/Vertical-Beach/ByteTrack-cpp/blob/e6ee5a1485bedd24e2b8d6411be5d8fef63a6c3e/CMakeLists.txt#L15 to fail. Generally, -march=native is an optimization that limits portability, as shown in this case. It would be best to remove that optimization directive and leave it to users of the library to apply as needed.

I'll post a PR removing this single option.

medalotte commented 2 years ago

Hi @derpda. Thanks for pointing this out. There is no problem about this, I merged the PR.