mirror of https://github.com/google/benchmark.git
CMake: check CMAKE_CXX_COMPILER_ID, not CMAKE_C_COMPILER_ID
This may or may not have gotten broken now that benchmark was marked as CXX-only.
This commit is contained in:
parent
12c978c513
commit
2e7203aa94
|
@ -191,7 +191,7 @@ else()
|
||||||
# Link time optimisation
|
# Link time optimisation
|
||||||
if (BENCHMARK_ENABLE_LTO)
|
if (BENCHMARK_ENABLE_LTO)
|
||||||
add_cxx_compiler_flag(-flto)
|
add_cxx_compiler_flag(-flto)
|
||||||
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
find_program(GCC_AR gcc-ar)
|
find_program(GCC_AR gcc-ar)
|
||||||
if (GCC_AR)
|
if (GCC_AR)
|
||||||
set(CMAKE_AR ${GCC_AR})
|
set(CMAKE_AR ${GCC_AR})
|
||||||
|
@ -200,7 +200,7 @@ else()
|
||||||
if (GCC_RANLIB)
|
if (GCC_RANLIB)
|
||||||
set(CMAKE_RANLIB ${GCC_RANLIB})
|
set(CMAKE_RANLIB ${GCC_RANLIB})
|
||||||
endif()
|
endif()
|
||||||
elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
include(llvm-toolchain)
|
include(llvm-toolchain)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue