Instead of running many small tests with many cmake projects, simply compare the generated export header against a reference. Remove the helper macros and the try_compiles which are duplicates of the library build tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>