Remove gcc flags when using msvc for building pyposelib
Building the python wheel on windows using msvc fails otherwise.
Are all the target_compile_options failing?
target_compile_options(pyposelib PRIVATE -march=native -Wall -Werror -fPIC -Wno-ignored-optimization-argument)
@pablospe Windows doesn't have an equivalent to march=native as far as I know. Instead it has specific cpu feature flags. -Wall and -Werror has their equivalents: /Wall and /WX, see https://learn.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=msvc-170
As for -fPIC there is no equivalent in MSVC.
So I think we're left with /Wall and /WX, and maybe we can check for CPU features and add /arch:SSE2, /arch:AVX, etc.
Btw, I didn't bother to further investigate since this same pattern was used here, where PoseLib is built: https://github.com/PoseLib/PoseLib/blob/56d158f744d3561b0b70174e6d8ca9a7fc9bd9c1/CMakeLists.txt#L23-L40
@vlarsson Should we merge this?
LGTM.