bvdberg/ctest — pull request #1 by brettdh (2012-05-01 14:51:42+00:00)
Title: (tentative) OS X compile/link fixes

Hurrah for a C unit-testing framework that's super-simple to set up and use. I added the following fixes for using CTest on OS X:

1) The test data section declaration threw an error like this one: http://code.google.com/p/rlog/issues/detail?id=7
Fixed in a similar fashion.
2) Weak linking doesn't work on OS X like it does on Linux, apparently: http://stackoverflow.com/questions/274753/how-to-make-weak-linking-work-with-gcc
So I just used the (somewhat hackish) fix to delay symbol resolution until run time.

These may not be the best way to fix these, so feel free to reject if you have a better idea. However, they do allow me to produce identical test results (for mytest.c) on OS X (10.6.7) and Linux (Ubuntu 10.10).