cmake: Disabled -Werror and -pedantic-errors if gmock or gtest integration is enabled

Because gtest and gmock headers cause some compiler warning with gcc and clang.