Files
CPM.cmake/examples/json/CMakeLists.txt
Vinpasso 5cb7398a24 [Example] Disable JSON tests being included in ctest (#329)
* 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
2022-01-12 20:29:59 +01:00

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)