Skip to content

Commit

Permalink
move datetime into a package
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Aug 18, 2023
1 parent e53dd8b commit 714f486
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/substrait/textplan/converter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

include(../../../../third_party/datetime.cmake)

set(TEXTPLAN_SRCS
InitialPlanProtoVisitor.cpp
InitialPlanProtoVisitor.h
Expand Down
2 changes: 2 additions & 0 deletions src/substrait/textplan/parser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

include(../../../../third_party/datetime.cmake)

add_subdirectory(grammar)

add_library(
Expand Down
7 changes: 3 additions & 4 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# SPDX-License-Identifier: Apache-2.0

if(NOT ${ABSL_INCLUDED_WITH_PROTOBUF})
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory(abseil-cpp)
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory(abseil-cpp)
endif()

set(BUILD_TZ_LIB ON)
add_subdirectory(datetime)
include(datetime.cmake)

add_subdirectory(fmt)
add_subdirectory(googletest)
Expand Down
1 change: 0 additions & 1 deletion third_party/datetime
Submodule datetime deleted from cc4685
13 changes: 13 additions & 0 deletions third_party/datetime.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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
)
#if(NOT ${date_src_POPULATED})
FetchContent_MakeAvailable(date_src)
#endif()

0 comments on commit 714f486

Please sign in to comment.