xxxSPLIT: various msvc fixes

 - move variable declaration before code
 - char bla[const int] does not work, so use a define
 - opening bracket must precede the APIENTRY symbol
 - wrap if (glHamSandwich() != GL_NO_ERROR || ,,,) in curly brackets, just because msvc loves us

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
c99_compat: add a couple of headers to silence compiler warnings

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
cmake: forward the toolset type to the cmocka build and add windows cmocka_library_location

TODO: rework cmoka handling so that we don't add custom commands,etc.
Perhaps a simple include() will work ?

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
wflinfo: silence signed/unsigned comparison warning

The variable i is used as and compared vs unsigned int.
Change it's type so silcence the compiler warning.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
xxxFIX tests: don't feed compiler flags unconditionally

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
cmake: can be package(msvc) if we disable the cpack_set_destdir ?

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/gl_basic_test: don't include posix headers when building with msvc

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/gl_basic_test: opening bracket must come before the APIENTRY symbol

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
unittests: fix msvc build

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Revert "cmake: can be package(msvc) if we disable the cpack_set_destdir ?"

This reverts commit 367857aceae1e9a0b2dc0dad943e523ea4f7dc28.
cmake: commence the battle of prefixed vs non-prefixed libraries *sigh*

TODO:
Keep both windows builds separate ? Or...
follow the unix/posix standard, or ...
the windows one.

What about the static library (waffle-1.lib) ?

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
cmake: add explicit compiler check for gcc,clang or msvc

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
cmake: set most compiler flags/defines in a single location

Rather than defining the same thing in three different places
set the approapriate flags and defines in WaffleDefineCompilerFlags.

Treat all compilers as equal - clang, gcc and msvc.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>