trezor/trezor-crypto — pull request #11 by dllaurence (2014-07-17 14:18:02+00:00)
Title: Make CMakeLists.txt build tests

I have my trezor-crypto repo in a subdirectory of my main project; it builds very well with just an add_directory(trezor-crypto), which was probably intended. The only problem is that CMake can't pick up the trezor-crypto tests. This patch solves that problem by adding the executables with add_test() and screening out the sequence-point flag that breaks the aes code. The openssl test doesn't terminate and so isn't suitable for running automatically, so I also added an optional command-line switch used when CMake runs the test to specify the number of iterations. Now you can just do 'make test' at the top level and have trezor-crypto's tests run along with all the others.

The other small change (which maybe should have been a different patch, sorry) is removing 'inline' from to-hex. At high warning levels GCC doesn't like inline functions with static data, so this was necessary to make the build clean, and it's the Right Thing to do.