moved BUILD_TESTS check outside of root cmake check to allow building tests in submodules (#777)
added check for GNUC >= 11 for -Wstringop-overread ignore pragma since it isn't introduced until gcc/g++-11
Co-authored-by: Josh <joshua.martens@magna.com>