File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,11 @@ endif()
6363if (DEFINED ENV{DWARFS_LOCAL_REPO_PATH})
6464 set (LIBFMT_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH} /fmt)
6565 set (GOOGLETEST_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH} /googletest)
66+ set (RANGE_V3_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH} /range-v3)
6667else ()
6768 set (LIBFMT_GIT_REPO https://github.com/fmtlib/fmt.git)
6869 set (GOOGLETEST_GIT_REPO https://github.com/google/googletest.git)
70+ set (RANGE_V3_GIT_REPO https://github.com/ericniebler/range-v3.git)
6971endif ()
7072
7173if (NOT DISABLE_CCACHE)
@@ -225,7 +227,22 @@ else()
225227endif ()
226228
227229find_package (Boost 1.67 REQUIRED COMPONENTS chrono iostreams program_options )
228- find_package (range-v3 CONFIG REQUIRED )
230+
231+ find_package (range-v3 0.12.0 CONFIG QUIET )
232+
233+ if (NOT range -v3_FOUND)
234+ FetchContent_Declare (
235+ range-v3
236+ GIT_REPOSITORY ${RANGE_V3_GIT_REPO}
237+ GIT_TAG 0.12.0
238+ )
239+ # FetchContent_MakeAvailable(range-v3)
240+ FetchContent_GetProperties (range-v3)
241+ if (NOT range -v3_POPULATED)
242+ FetchContent_Populate (range-v3)
243+ add_subdirectory (${range-v3_SOURCE_DIR} ${range-v3_BINARY_DIR} EXCLUDE_FROM_ALL )
244+ endif ()
245+ endif ()
229246
230247if (STATIC_BUILD_DO_NOT_USE)
231248 set (CMAKE_FIND_LIBRARY_SUFFIXES .a)
You can’t perform that action at this time.
0 commit comments