File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.15)
2+
3+ project (cloudflare-ddns)
4+
5+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
6+ add_compile_options (-fuse-ld=lld -Wno-unused-command -line-argument)
7+ add_link_options (-fuse-ld=lld)
8+ endif ()
9+
10+ include (CheckIPOSupported)
11+ check_ipo_supported(RESULT ipo_result OUTPUT ipo_output)
12+ if (ipo_result)
13+ cmake_policy (SET CMP0069 NEW)
14+ set (CMAKE_POLICY_DEFAULT_CMP0069 NEW)
15+ set (CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
16+ endif ()
17+
18+ include (FetchContent)
19+
20+ FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/whoshuu/cpr.git GIT_TAG 1.5.2)
21+ set (BUILD_SHARED_LIBS OFF CACHE BOOL "" )
22+ FetchContent_MakeAvailable(cpr)
23+
24+ FetchContent_Declare(json GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git GIT_TAG v3.9.1)
25+ FetchContent_GetProperties(json)
26+ if (NOT json_POPULATED)
27+ FetchContent_Populate(json)
28+ add_subdirectory (${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL )
29+ endif ()
30+
31+ FetchContent_Declare(simdjson GIT_REPOSITORY https://github.com/simdjson/simdjson.git GIT_TAG v0.8.2 GIT_SHALLOW TRUE )
32+ set (SIMDJSON_JUST_LIBRARY ON CACHE INTERNAL "" )
33+ set (SIMDJSON_BUILD_STATIC ON CACHE INTERNAL "" )
34+ FetchContent_MakeAvailable(simdjson)
35+
36+ add_executable (${PROJECT_NAME} cloudflare-ddns/main.cpp)
37+
38+ target_link_libraries (${PROJECT_NAME} PRIVATE cpr::cpr nlohmann_json::nlohmann_json simdjson)
You can’t perform that action at this time.
0 commit comments