mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-19 16:57:56 -05:00
v0.9 (#46)
* always get properties * update examples * update travis * add doctest example * update example runner
This commit is contained in:
28
examples/benchmark/CMakeLists.txt
Normal file
28
examples/benchmark/CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
|
||||
# ---- Dependencies ----
|
||||
|
||||
include(../../cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME fibonacci
|
||||
GIT_REPOSITORY https://github.com/TheLartians/Fibonacci.git
|
||||
VERSION 1.0
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME benchmark
|
||||
GIT_REPOSITORY https://github.com/google/benchmark.git
|
||||
VERSION 1.4.1
|
||||
OPTIONS
|
||||
"BENCHMARK_ENABLE_TESTING Off"
|
||||
)
|
||||
|
||||
# patch google benchmark target
|
||||
set_target_properties(benchmark PROPERTIES CXX_STANDARD 17)
|
||||
|
||||
# ---- Executable ----
|
||||
|
||||
add_executable(CPMExampleBenchmark "main.cpp")
|
||||
set_target_properties(CPMExampleBenchmark PROPERTIES CXX_STANDARD 17)
|
||||
target_link_libraries(CPMExampleBenchmark fibonacci benchmark)
|
||||
Reference in New Issue
Block a user