aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGregorio Litenstein <g.litenstein@gmail.com>2018-10-05 12:44:02 -0300
committerDominic Hamon <dominichamon@users.noreply.github.com>2018-10-05 16:44:02 +0100
commit9ffb8df6c5d62a677ee27d19cee93a6f3197fd19 (patch)
treec7f3f980c0ceeba7684a7c7f38d0bd8ae3d399dd /cmake
parenta8082de5dfdd2132e8bda432314efbce3f280f99 (diff)
downloadgoogle-benchmark-9ffb8df6c5d62a677ee27d19cee93a6f3197fd19.tar.gz
Fix Clang Detection (#697)
For several versions now, CMake by default refers to macOS’ Clang as AppleClang instead of just Clang, which would fail STREQUAL. Fixed by changing it to MATCHES.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/HandleGTest.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/HandleGTest.cmake b/cmake/HandleGTest.cmake
index 7ce1a63..8c03b75 100644
--- a/cmake/HandleGTest.cmake
+++ b/cmake/HandleGTest.cmake
@@ -5,7 +5,7 @@ macro(build_external_gtest)
include(ExternalProject)
set(GTEST_FLAGS "")
if (BENCHMARK_USE_LIBCXX)
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
list(APPEND GTEST_FLAGS -stdlib=libc++)
else()
message(WARNING "Unsupported compiler (${CMAKE_CXX_COMPILER}) when using libc++")