mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-18 18:15:50 +00:00
* use tagged containers for pkg build * update build images * continue to build container images in pipeline, but allow failure (non-block) * limit travis macos cache * add vs2019 windows to travis * remove xcode 9 travis build * remove clang5/6 from CI and update min version of Clang required in cmake * break windows CI build into stages to reduce timeouts * update datelib * add if condition to travis builds to allow commit message to limit builds by platform
50 lines
1.7 KiB
CMake
50 lines
1.7 KiB
CMake
#[===================================================================[
|
|
NIH dep: date
|
|
|
|
the main library is header-only, thus is an INTERFACE lib in CMake.
|
|
|
|
NOTE: this has been accepted into c++20 so can likely be replaced
|
|
when we update to that standard
|
|
#]===================================================================]
|
|
|
|
find_package (date QUIET)
|
|
if (NOT TARGET date::date)
|
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
|
|
FetchContent_Declare(
|
|
hh_date_src
|
|
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
|
|
GIT_TAG fc4cf092f9674f2670fb9177edcdee870399b829
|
|
)
|
|
FetchContent_MakeAvailable(hh_date_src)
|
|
else ()
|
|
ExternalProject_Add (hh_date_src
|
|
PREFIX ${nih_cache_path}
|
|
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
|
|
GIT_TAG fc4cf092f9674f2670fb9177edcdee870399b829
|
|
CONFIGURE_COMMAND ""
|
|
BUILD_COMMAND ""
|
|
TEST_COMMAND ""
|
|
INSTALL_COMMAND ""
|
|
)
|
|
ExternalProject_Get_Property (hh_date_src SOURCE_DIR)
|
|
set (hh_date_src_SOURCE_DIR "${SOURCE_DIR}")
|
|
file (MAKE_DIRECTORY ${hh_date_src_SOURCE_DIR}/include)
|
|
add_library (date_interface INTERFACE)
|
|
add_library (date::date ALIAS date_interface)
|
|
add_dependencies (date_interface hh_date_src)
|
|
file (TO_CMAKE_PATH "${hh_date_src_SOURCE_DIR}" hh_date_src_SOURCE_DIR)
|
|
target_include_directories (date_interface
|
|
SYSTEM INTERFACE
|
|
$<BUILD_INTERFACE:${hh_date_src_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>)
|
|
install (
|
|
FILES
|
|
${hh_date_src_SOURCE_DIR}/include/date/date.h
|
|
DESTINATION include/date)
|
|
install (TARGETS date_interface
|
|
EXPORT RippleExports
|
|
INCLUDES DESTINATION include)
|
|
endif ()
|
|
endif ()
|
|
|