cmake: Move targets check, check-func to top dir

By moving 'check' to the top dir, each subdirectory can now add
dependencies to 'check'. Ditto for 'check-func'.

This change will allow us to build each unittest file as a separate
executable, as well as maintain the CMake rules for the unittest in in
the same directory as its sources.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle_test: Move source from 'tests' to 'src' and 'include'

This moves the waffle_test sources into a more canonical location.
Instead of keeping it jailed as a subdir of 'tests' as
'tests/waffle_test', its source is now in 'src/waffle_test' and its
public headers in 'include/waffle_test'.

Keeping things in canonical locations makes it easier to find things if
you don't yet know where they reside.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle: Link external dependencies to libwaffle_static.a

The static library is not very useful if it can't call out to required
external functions.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle: Fix build location of libwaffle_static.a

I intended to place libwaffle_static.a into ${CMAKE_BINARY_DIR}/lib,
which is the same directory into which libwaffle.so is placed. However,
I failed at CMake-foo for static libraries.  The
LIBRARY_OUTPUT_DIRECTORY property is ignored for static libraries.
Instead, the ARCHIVE_OUTPUT_DIRECTORY property must be used.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle: Fix name of static waffle library

Rename it 'libwaffle_static.a' -> 'libwaffle-1.a'.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Move wcore_attrib_list unittests to separate executable

Pull the unittests for wcore_attrib_list out of the waffle-unittest
executable and place them into a new separate executable,
'tests/wcore_attrib_list_unittests'.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Move wcore_config_attrs unittests to separate executable

Pull the unittests for wcore_config_attrs out of the waffle-unittest
executable and place them into a new separate executable,
'tests/wcore_config_attrs_unittests'.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Move wcore_error unittests to separate executable

Pull the unittests for wcore_error out of the waffle-unittest
executable and place them into a new separate executable,
'tests/wcore_error_unittests'.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests: Remove waffle-unittest runner

All unittests have now been moved into separate executables, one
executable per unit.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Refactor repeating patterns for unittests

Move all repetition into new function add_unittest().

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>