mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -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>
27 lines
674 B
CMake
27 lines
674 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMRangev3Example)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
CPMAddPackage(
|
|
NAME range-v3
|
|
URL https://github.com/ericniebler/range-v3/archive/0.11.0.zip
|
|
VERSION 0.11.0
|
|
# the range-v3 CMakeLists screws with configuration options
|
|
DOWNLOAD_ONLY True
|
|
)
|
|
|
|
if(range-v3_ADDED)
|
|
add_library(range-v3 INTERFACE IMPORTED)
|
|
target_include_directories(range-v3 SYSTEM INTERFACE "${range-v3_SOURCE_DIR}/include")
|
|
endif()
|
|
|
|
# ---- Executable ----
|
|
|
|
add_executable(CPMRangev3Example main.cpp)
|
|
target_compile_features(CPMRangev3Example PRIVATE cxx_std_17)
|
|
target_link_libraries(CPMRangev3Example range-v3)
|