Thirdparty benchmark: Fix Clang detection.
CMake 3.0+ refers to macOS’ Clang as AppleClang, which would fail a STREQUAL check. Fixed by changing it to MATCHES.
This commit is contained in:
parent
b911654857
commit
e8427061a0
2 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,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++")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue