cmake fix for windows

`-Wno-shadow -Wno-error` not supported on windows.
Support of these flags depends on compiler not on OS. I suggest use CMAKE_COMPILER_IS_GNUCXX instead.