diff --git a/src/substrait/textplan/converter/CMakeLists.txt b/src/substrait/textplan/converter/CMakeLists.txt index 6f67271e..5ee27539 100644 --- a/src/substrait/textplan/converter/CMakeLists.txt +++ b/src/substrait/textplan/converter/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +include(../../../../third_party/datetime.cmake) + set(TEXTPLAN_SRCS InitialPlanProtoVisitor.cpp InitialPlanProtoVisitor.h diff --git a/src/substrait/textplan/parser/CMakeLists.txt b/src/substrait/textplan/parser/CMakeLists.txt index 4c89fa83..fcc01413 100644 --- a/src/substrait/textplan/parser/CMakeLists.txt +++ b/src/substrait/textplan/parser/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +include(../../../../third_party/datetime.cmake) + add_subdirectory(grammar) add_library( diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 7b8d8e60..2124c76d 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -5,8 +5,7 @@ if(NOT ${ABSL_INCLUDED_WITH_PROTOBUF}) add_subdirectory(abseil-cpp) endif() -set(BUILD_TZ_LIB ON) -add_subdirectory(datetime) +include(datetime.cmake) add_subdirectory(fmt) add_subdirectory(googletest) diff --git a/third_party/datetime b/third_party/datetime deleted file mode 160000 index cc4685a2..00000000 --- a/third_party/datetime +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc4685a21e4a4fdae707ad1233c61bbaff241f93 diff --git a/third_party/datetime.cmake b/third_party/datetime.cmake new file mode 100644 index 00000000..f96aa06c --- /dev/null +++ b/third_party/datetime.cmake @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: Apache-2.0 + +include_guard(GLOBAL) + +set (BUILD_TZ_LIB ON CACHE BOOL "timezone library is a dependency" FORCE) +include(FetchContent) +FetchContent_Declare(date_src + GIT_REPOSITORY https://github.com/HowardHinnant/date.git + GIT_TAG v3.0.1 + ) +FetchContent_MakeAvailable(date_src)