From 286f834ce60e4ebcaaf131cb7da97ebf79098fa0 Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Wed, 22 Jun 2022 11:30:23 -0700 Subject: Simplify the argument parsing and debug code Change-Id: Ia681aa0eb1d42fa31a4658badb376f7b32b2e338 Signed-off-by: Eric Kunze --- thirdparty/CMakeLists.txt | 9 +++++++++ thirdparty/cxxopts/CMakeLists.txt | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 thirdparty/cxxopts/CMakeLists.txt (limited to 'thirdparty') diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index a85af3c..abcc52c 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -1,8 +1,17 @@ cmake_minimum_required (VERSION 3.4) +# fetch 3rd party libraries +include(FetchContent) +FetchContent_Declare( + cxxopts + URL https://github.com/jarro2783/cxxopts/archive/v2.2.1.tar.gz + URL_MD5 6e70da4fc17a09f32612443f1866042e +) + set(CMAKE_INSTALL_PREFIX "./thirdparty" CACHE PATH "..." FORCE) project(thirdparty LANGUAGES CXX) +add_subdirectory(cxxopts) add_subdirectory(serialization_lib EXCLUDE_FROM_ALL) add_subdirectory(json EXCLUDE_FROM_ALL) diff --git a/thirdparty/cxxopts/CMakeLists.txt b/thirdparty/cxxopts/CMakeLists.txt new file mode 100644 index 0000000..e81bf08 --- /dev/null +++ b/thirdparty/cxxopts/CMakeLists.txt @@ -0,0 +1,8 @@ +set(CXXOPTS_BUILD_EXAMPLES OFF CACHE INTERNAL "") +set(CXXOPTS_BUILD_TESTS OFF CACHE INTERNAL "") +FetchContent_GetProperties(cxxopts) +if(NOT cxxopts_POPULATED) + FetchContent_Populate(cxxopts) + add_subdirectory(${cxxopts_SOURCE_DIR} ${cxxopts_BINARY_DIR} EXCLUDE_FROM_ALL) + +endif() -- cgit v1.2.1