mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
* Disable JSON tests being included in ctest If `CPMAddPackage` includes json without setting JSON_BuildTests off first then the target's ctest will include lots of json's tests. * Bump example JSON version to avoid JSON tests
15 lines
364 B
CMake
15 lines
364 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMJSONExample)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
CPMAddPackage("gh:nlohmann/json@3.10.5")
|
|
|
|
# ---- Executable ----
|
|
|
|
add_executable(CPMJSONExample main.cpp)
|
|
target_compile_features(CPMJSONExample PRIVATE cxx_std_17)
|
|
target_link_libraries(CPMJSONExample nlohmann_json::nlohmann_json)
|