Skip to content

Commit

Permalink
[Improve] Use gar-related names for arrow project and ccache to avoid…
Browse files Browse the repository at this point in the history
… duplicated project name (#102)
  • Loading branch information
acezen authored Feb 16, 2023
1 parent c2c5ec6 commit 84a3fde
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
run: |
pushd build
make -j$(nproc)
make ccache-stats
make gar-ccache-stats
popd
- name: Test
Expand Down
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ if(NOT (CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache") AND NOT (CMAKE_C_COMPILER_
if(ccache_EXECUTABLE)
set(CMAKE_C_COMPILER_LAUNCHER ${ccache_EXECUTABLE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${ccache_EXECUTABLE})
add_custom_target(ccache-stats
add_custom_target(gar-ccache-stats
COMMAND ${ccache_EXECUTABLE} --show-stats
)
else()
add_custom_target(ccache-stats
add_custom_target(gar-ccache-stats
COMMAND echo "ccache not found."
)
endif(ccache_EXECUTABLE)
Expand Down Expand Up @@ -188,12 +188,12 @@ macro(build_gar)
add_dependencies(gar yaml-cpp)
get_target_location(YAML_CPP_LIBRARY_LOCATION yaml-cpp)
if(APPLE)
target_link_libraries(gar PRIVATE -Wl,-force_load arrow_static
target_link_libraries(gar PRIVATE -Wl,-force_load gar_arrow_static
"${YAML_CPP_LIBRARY_LOCATION}"
"${PARQUET_STATIC_LIB}"
"${ARROW_BUNDLED_DEPS_STATIC_LIB}")
else()
target_link_libraries(gar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive arrow_static
target_link_libraries(gar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive gar_arrow_static
"${YAML_CPP_LIBRARY_LOCATION}"
"${PARQUET_STATIC_LIB}"
"${ARROW_BUNDLED_DEPS_STATIC_LIB}" -Wl,--no-whole-archive)
Expand Down Expand Up @@ -224,11 +224,11 @@ if (BUILD_EXAMPLES)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
target_link_libraries(${E_NAME} PRIVATE gar ${Boost_LIBRARIES} Threads::Threads ${CMAKE_DL_LIBS})
if(APPLE)
target_link_libraries(${E_NAME} PRIVATE -Wl,-force_load arrow_static
target_link_libraries(${E_NAME} PRIVATE -Wl,-force_load gar_arrow_static
"${PARQUET_STATIC_LIB}"
"${ARROW_BUNDLED_DEPS_STATIC_LIB}")
else()
target_link_libraries(${E_NAME} PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive arrow_static
target_link_libraries(${E_NAME} PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive gar_arrow_static
"${PARQUET_STATIC_LIB}"
"${ARROW_BUNDLED_DEPS_STATIC_LIB}" -Wl,--no-whole-archive)
endif()
Expand Down Expand Up @@ -289,11 +289,11 @@ if (BUILD_TESTS)
target_compile_features(${target} PRIVATE cxx_std_17)
target_link_libraries(${target} PRIVATE Catch2::Catch2 gar Threads::Threads ${CMAKE_DL_LIBS})
if(APPLE)
target_link_libraries(${target} PRIVATE -Wl,-force_load arrow_static
target_link_libraries(${target} PRIVATE -Wl,-force_load gar_arrow_static
"${PARQUET_STATIC_LIB}"
"${ARROW_BUNDLED_DEPS_STATIC_LIB}")
else()
target_link_libraries(${target} PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive arrow_static
target_link_libraries(${target} PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive gar_arrow_static
"${PARQUET_STATIC_LIB}"
"${ARROW_BUNDLED_DEPS_STATIC_LIB}" -Wl,--no-whole-archive)
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/apache-arrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function(build_arrow)
CMAKE_ARGS "${ARROW_CMAKE_ARGS}"
BUILD_BYPRODUCTS "${ARROW_BUILD_BYPRODUCTS}")

set(ARROW_LIBRARY_TARGET arrow_static)
set(PARQUET_LIBRARY_TARGET parquet_static)
set(ARROW_LIBRARY_TARGET gar_arrow_static)
set(PARQUET_LIBRARY_TARGET gar_parquet_static)

file(MAKE_DIRECTORY "${ARROW_INCLUDE_DIR}")
add_library(${ARROW_LIBRARY_TARGET} STATIC IMPORTED)
Expand Down

0 comments on commit 84a3fde

Please sign in to comment.