noloader / cryptopp-cmake

CMake files for Crypto++ project
BSD 3-Clause "New" or "Revised" License
92 stars 67 forks source link

Update CMakeLists.txt #9

Closed jar1karp closed 6 years ago

jar1karp commented 6 years ago

This is related to PR https://github.com/netheril96/securefs/pull/61. I am getting build errors on Fedora 28 due to the cmake file incorrectly determining the version of GNU as. Fedora 28 has as version 2.29.1 so none of the additional defines are needed, but CRYPTOPP_DISABLE_ASM is added nevertheless, and this breaks the build.

The cmake file checks for GNU assumbler in version printed by as which contains a typo (it should be assembler. Cmake string FIND returns the position of the string matched. In this case the return value should be zero, and -1 in the case that no match is found. I guess that always evaluated to true previously due to the typo.

Further problem in the version checks probably only manifests if using Finnish locale. The version string is translated to read GNU assembleri so the regexes should allow for that extra i.

With these fixes I can get cryptopp built without problems.

noloader commented 6 years ago

Thanks @jar1karp. Sorry about the trouble.

I'm sending you a collaborator request so you don't have to wait for me to check-in a fix.