CMakeLists: updates for clang-cl, skipping benchmarks, and C++17

1. Test MSVC instead of CMAKE_CXX_COMPILER_ID MATCHES "MSVC"
When using the 'clang-cl' simulation of MSVC's 'cl' compiler,
we want to execute these adjustments, and MSVC will be true,
but CMAKE_CXX_COMPILER_ID MATCHES "MSVC" will not.
Thanks to Alexander Neumann for flagging and for the explanation.
Fixes #532.

2. Separate out building tests from building benchmarks, because
they have different dependencies, and some people might want to
build tests and skip the benchmarks.

3. Update to C++17 and factor that out to make future updates easier.
We require C++17 now per
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md

Change-Id: I5691847d5ff17636143981086f370e95e34900bd
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63774
Reviewed-by: Alan Donovan <adonovan@google.com>
1 file changed