Fix for clang detection in cmake

This commit is contained in:
Benjamin Piwowarski 2014-04-24 17:16:43 +02:00
parent f887efedf1
commit 4cb8a83dab

View File

@ -34,7 +34,7 @@
INCLUDE(CheckCXXSourceCompiles)
INCLUDE(FindPackageHandleStandardArgs)
if (CMAKE_CXX_COMPILER MATCHES "clang")
if (CMAKE_CXX_COMPILER_ID MATCHES "^[cC]lang$")
set(CXX11_FLAG_CANDIDATES "--std=c++11")
else()
set(CXX11_FLAG_CANDIDATES