Closed mojca closed 2 years ago
All the extra warnings should be wrapped in proper tests. The marked if(unix) is just a residual from the conversion from autoconf/automake where it had a differen condition which was not easy to port over.
For autoconf I had written a number of macros to be able to check compiler flags as compilers can express the same option very very differently and previous authors were wrong in too many occasions. When converting the parts to cmake I did not invest the time to get to that detail degree again and this was the simplest approach you see now.
Solved by pull request #139 submitted by @barracuda156
The flag
-Warray-bounds
added by https://github.com/gdraheim/zziplib/blob/master/zzip/CMakeLists.txt#L118 is apparently not recognised by all compilers.Maybe https://cmake.org/cmake/help/latest/module/CheckCXXCompilerFlag.html could be used to check whether the flag is supported before unconditionally adding one.
(Admittedly this is about a "slightly older" compiler, so in case you consider this too much of a hassle, we can patch the sources locally.)
Reported by @evanmiller in https://trac.macports.org/ticket/63951.