Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
e8427061
Commit
e8427061
authored
Oct 05, 2018
by
Gregorio Litenstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
b9116548
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
CMakeLists.txt
benchmarks/thirdparty/benchmark/CMakeLists.txt
+2
-2
HandleGTest.cmake
benchmarks/thirdparty/benchmark/cmake/HandleGTest.cmake
+1
-1
No files found.
benchmarks/thirdparty/benchmark/CMakeLists.txt
View file @
e8427061
...
...
@@ -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
()
...
...
@@ -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"
)
...
...
benchmarks/thirdparty/benchmark/cmake/HandleGTest.cmake
View file @
e8427061
...
...
@@ -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++"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment