diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63c16ebfdc480b263ae4bb90126bfdff2f9349d3..93eccf91108d44e0baaefc33d006c815110eaf5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,12 +128,12 @@ else()
 endif()
 
 include(BornAgain/Compiler)
-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     set(CLANG ON)
 elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     set(GCC ON)
 elseif(NOT WIN32)
-    message(FATAL_ERROR "Unsupported compiler")
+    message(FATAL_ERROR "Unsupported compiler, id=${CMAKE_CXX_COMPILER_ID}")
 endif()
 
 if(ZERO_TOLERANCE)