CMake: Only build turbo-cov with clang + llvm 10

turbo-cov can only process clang coverage information, so there's no point building it for other toolchains.

turbo-cov depends on the llvm-10 libs and headers, and does not build against llvm-7.

Bug: b/152192800
Change-Id: I522ecb3adfbd448aa47673c452a83083134a36ca
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44728
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c26ffac..954b051 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -723,7 +723,9 @@
     add_subdirectory(src/Device) # Add vk_device target
     add_subdirectory(src/Vulkan) # Add vk_swiftshader target
 
-    if(SWIFTSHADER_EMIT_COVERAGE)
+    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND # turbo-cov is only useful for clang coverage info
+       SWIFTSHADER_LLVM_VERSION EQUAL "10.0" AND # turbo-cov does not build with earlier llvm versions
+       SWIFTSHADER_EMIT_COVERAGE)
         add_subdirectory(${TESTS_DIR}/regres/cov/turbo-cov)
     endif()