Only run tests when --enable-unit-tests

If we don't check this, the tests will break
with a lot of noise because the boost unit tests
libraries are not found.
Warn when tests are not enabled
Merge pull request #1580 from rubenk/only-run-tests-when-unit-tests-enabled

Only run tests when unit tests enabled