Skip to content

Commit

Permalink
Apply code formatting fixes from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cryos committed Nov 7, 2024
1 parent 6d96fa3 commit fbe1535
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 23 deletions.
12 changes: 6 additions & 6 deletions CMake/ResolveDependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ endmacro()

# * Macro to resolve third-party dependencies.
#
# Provides the macro velox_resolve_dependency(). This macro will allow us to find the
# dependency via the usage of find_package or use the custom
# velox_build_dependency(dependency_name) macro to download and build the third party
# dependency.
# Provides the macro velox_resolve_dependency(). This macro will allow us to
# find the dependency via the usage of find_package or use the custom
# velox_build_dependency(dependency_name) macro to download and build the third
# party dependency.
#
# velox_resolve_dependency(dependency_name [...] )
#
Expand Down Expand Up @@ -89,7 +89,7 @@ endmacro()
# By using a macro we don't need to propagate the value into the parent scope.
macro(velox_set_source dependency_name)
velox_set_with_default(${dependency_name}_SOURCE ${dependency_name}_SOURCE
${VELOX_DEPENDENCY_SOURCE})
${VELOX_DEPENDENCY_SOURCE})
message(
STATUS "Setting ${dependency_name} source to ${${dependency_name}_SOURCE}")
endmacro()
Expand Down Expand Up @@ -143,7 +143,7 @@ macro(velox_resolve_dependency_url dependency_name)
"${VELOX_${dependency_name}_SOURCE_URL}")
if(DEFINED ENV{VELOX_${dependency_name}_URL})
velox_set_with_default(VELOX_${dependency_name}_BUILD_SHA256_CHECKSUM
VELOX_${dependency_name}_SHA256 "")
VELOX_${dependency_name}_SHA256 "")
if(DEFINED ENV{VELOX_${dependency_name}_SHA256})
string(PREPEND VELOX_${dependency_name}_BUILD_SHA256_CHECKSUM "SHA256=")
endif()
Expand Down
7 changes: 4 additions & 3 deletions CMake/resolve_dependency_modules/absl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ include_guard(GLOBAL)
set(VELOX_ABSL_BUILD_VERSION 20240116.2)
set(VELOX_ABSL_BUILD_SHA256_CHECKSUM
733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc)
string(CONCAT VELOX_ABSL_SOURCE_URL
"https://github.com/abseil/abseil-cpp/archive/refs/tags/"
"${VELOX_ABSL_BUILD_VERSION}.tar.gz")
string(
CONCAT VELOX_ABSL_SOURCE_URL
"https://github.com/abseil/abseil-cpp/archive/refs/tags/"
"${VELOX_ABSL_BUILD_VERSION}.tar.gz")

velox_resolve_dependency_url(ABSL)

Expand Down
4 changes: 3 additions & 1 deletion CMake/resolve_dependency_modules/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,7 @@ set(BUILD_SHARED_LIBS OFF)
FetchContent_MakeAvailable(Boost)

list(TRANSFORM BOOST_HEADER_ONLY PREPEND Boost::)
target_link_libraries(boost_headers INTERFACE ${BOOST_HEADER_ONLY})
target_link_libraries(
boost_headers
INTERFACE ${BOOST_HEADER_ONLY})
add_library(Boost::headers ALIAS boost_headers)
7 changes: 4 additions & 3 deletions CMake/resolve_dependency_modules/gflags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ include_guard(GLOBAL)
set(VELOX_GFLAGS_VERSION 2.2.2)
set(VELOX_GFLAGS_BUILD_SHA256_CHECKSUM
34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf)
string(CONCAT VELOX_GFLAGS_SOURCE_URL
"https://github.com/gflags/gflags/archive/refs/tags/"
"v${VELOX_GFLAGS_VERSION}.tar.gz")
string(
CONCAT VELOX_GFLAGS_SOURCE_URL
"https://github.com/gflags/gflags/archive/refs/tags/"
"v${VELOX_GFLAGS_VERSION}.tar.gz")

velox_resolve_dependency_url(GFLAGS)

Expand Down
16 changes: 13 additions & 3 deletions CMake/resolve_dependency_modules/icu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,22 @@ file(MAKE_DIRECTORY ${ICU_INCLUDE_DIRS})
file(MAKE_DIRECTORY ${ICU_LIBRARIES})

# Create a target for each component
set(icu_components data i18n io uc tu test)
set(icu_components
data
i18n
io
uc
tu
test)

foreach(component ${icu_components})
add_library(ICU::${component} SHARED IMPORTED)
string(CONCAT ICU_${component}_LIBRARY ${ICU_LIBRARIES} "/libicu"
${component} ".so")
string(
CONCAT ICU_${component}_LIBRARY
${ICU_LIBRARIES}
"/libicu"
${component}
".so")
file(TOUCH ${ICU_${component}_LIBRARY})
set_target_properties(
ICU::${component}
Expand Down
7 changes: 4 additions & 3 deletions CMake/resolve_dependency_modules/protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ if(${VELOX_PROTOBUF_BUILD_VERSION} LESS 22.0)
else()
velox_set_source(absl)
velox_resolve_dependency(absl CONFIG REQUIRED)
string(CONCAT VELOX_PROTOBUF_SOURCE_URL
"https://github.com/protocolbuffers/protobuf/archive/"
"v${VELOX_PROTOBUF_BUILD_VERSION}.tar.gz")
string(
CONCAT VELOX_PROTOBUF_SOURCE_URL
"https://github.com/protocolbuffers/protobuf/archive/"
"v${VELOX_PROTOBUF_BUILD_VERSION}.tar.gz")
endif()

velox_resolve_dependency_url(PROTOBUF)
Expand Down
7 changes: 4 additions & 3 deletions CMake/resolve_dependency_modules/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ include_guard(GLOBAL)
set(VELOX_PYBIND11_BUILD_VERSION 2.10.0)
set(VELOX_PYBIND11_BUILD_SHA256_CHECKSUM
eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec)
string(CONCAT VELOX_PYBIND11_SOURCE_URL
"https://github.com/pybind/pybind11/archive/refs/tags/"
"v${VELOX_PYBIND11_BUILD_VERSION}.tar.gz")
string(
CONCAT VELOX_PYBIND11_SOURCE_URL
"https://github.com/pybind/pybind11/archive/refs/tags/"
"v${VELOX_PYBIND11_BUILD_VERSION}.tar.gz")

velox_resolve_dependency_url(PYBIND11)

Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake"
include(ResolveDependency)
include(VeloxUtils)

velox_set_with_default(VELOX_DEPENDENCY_SOURCE_DEFAULT VELOX_DEPENDENCY_SOURCE AUTO)
velox_set_with_default(VELOX_DEPENDENCY_SOURCE_DEFAULT VELOX_DEPENDENCY_SOURCE
AUTO)
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

# Add all options below
Expand Down

0 comments on commit fbe1535

Please sign in to comment.