mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 22:58:14 -05:00
* update most package versions extent build_all.py to inject cmake modules and use Ninja generator * fix build problems while build on debian use SYSTEM include paths (for clang++) we should not use local installed header! * fix banchmark example finalize cmake project code injection as an option * fix build problems on travis CI gtest needs c++17 * Update examples/build_all.py Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com> * reindent py script requested by review indent with only 2 spaces again * changes according the review the gtest build error seems to be a make -j cpucount problem * revert filter too Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>
32 lines
715 B
CMake
32 lines
715 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMExampleBenchmark)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
CPMAddPackage(
|
|
NAME fibonacci
|
|
GITLAB_REPOSITORY TheLartians/Fibonacci
|
|
VERSION 2.0
|
|
)
|
|
|
|
CPMAddPackage(
|
|
NAME benchmark
|
|
GITHUB_REPOSITORY google/benchmark
|
|
VERSION 1.5.2
|
|
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
|
|
)
|
|
|
|
if(benchmark_ADDED)
|
|
# Don't use C++14 because it doesn't work in some configurations.
|
|
set_target_properties(benchmark PROPERTIES CXX_STANDARD 11)
|
|
endif()
|
|
|
|
# ---- Executable ----
|
|
|
|
add_executable(CPMExampleBenchmark "main.cpp")
|
|
target_link_libraries(CPMExampleBenchmark fibonacci benchmark)
|
|
target_compile_features(CPMExampleBenchmark PRIVATE cxx_std_17)
|