Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
5567ed01
Commit
5567ed01
authored
Oct 17, 2020
by
kitattyor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Download googlebenchmark if not found; requires cmake 3.11
parent
cbe94486
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
bench/CMakeLists.txt
bench/CMakeLists.txt
+18
-1
No files found.
bench/CMakeLists.txt
View file @
5567ed01
...
...
@@ -9,7 +9,24 @@ if(NOT TARGET spdlog)
endif
()
find_package
(
Threads REQUIRED
)
find_package
(
benchmark CONFIG REQUIRED
)
find_package
(
benchmark CONFIG
)
if
(
NOT benchmark_FOUND
)
message
(
STATUS
"Using CMake Version
${
CMAKE_VERSION
}
"
)
if
(
${
CMAKE_VERSION
}
VERSION_GREATER_EQUAL
"3.11.0"
)
# User can fetch googlebenchmark
message
(
STATUS
"Downloading GoogleBenchmark"
)
include
(
FetchContent
)
set
(
BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE INTERNAL
""
)
# Do not build and run googlebenchmark tests
FetchContent_Declare
(
googlebenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG v1.5.2
)
FetchContent_MakeAvailable
(
googlebenchmark
)
else
()
message
(
FATAL_ERROR
"GoogleBenchmark is missing. Use CMake >= 3.11 or download it"
)
endif
()
endif
()
add_executable
(
bench bench.cpp
)
spdlog_enable_warnings
(
bench
)
...
...
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