Skip to content

Commit

Permalink
Merge pull request #1277 from performous/fix-clang-detection
Browse files Browse the repository at this point in the history
Thirdparty benchmark: Fix Clang detection.
  • Loading branch information
nlohmann authored Oct 6, 2018
2 parents f1768a5 + e842706 commit ac38e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions benchmarks/thirdparty/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ else()
if (GCC_RANLIB)
set(CMAKE_RANLIB ${GCC_RANLIB})
endif()
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
include(llvm-toolchain)
endif()
endif()
Expand All @@ -165,7 +165,7 @@ else()
endif()

if (BENCHMARK_USE_LIBCXX)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
add_cxx_compiler_flag(-stdlib=libc++)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/thirdparty/benchmark/cmake/HandleGTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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++")
Expand Down

0 comments on commit ac38e95

Please sign in to comment.