Skip to content

Commit

Permalink
Clean up build dependencies
Browse files Browse the repository at this point in the history
Change-Id: I8b5435349957fe626becce7a147ff3e0044d0b6d
  • Loading branch information
wesm committed Jun 23, 2017
1 parent da31c2c commit 198dee1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
32 changes: 13 additions & 19 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ if (ARROW_NO_DEPRECATED_API)
add_definitions(-DARROW_NO_DEPRECATED_API)
endif()

############################################################
# Dependencies
############################################################

include(ThirdpartyToolchain)

# Add common flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_COMMON_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARROW_CXXFLAGS}")
Expand Down Expand Up @@ -411,12 +417,6 @@ endfunction()

enable_testing()

############################################################
# Dependencies
############################################################

include(ThirdpartyToolchain)

############################################################
# "make ctags" target
############################################################
Expand Down Expand Up @@ -526,12 +526,14 @@ set(ARROW_STATIC_LINK_LIBS
snappy
zlib)

set(ARROW_DEPENDENCIES
${ARROW_STATIC_LINK_LIBS})

set(ARROW_MIN_TEST_LIBS
${ARROW_STATIC_LINK_LIBS}
arrow_static
${ARROW_STATIC_LINK_LIBS}
gtest
gtest_main
${ARROW_BASE_LIBS})
gtest_main)

if(NOT MSVC)
set(ARROW_MIN_TEST_LIBS
Expand All @@ -544,10 +546,10 @@ set(ARROW_TEST_LINK_LIBS ${ARROW_MIN_TEST_LIBS})
set(ARROW_BENCHMARK_LINK_LIBS
arrow_static
arrow_benchmark_main
${ARROW_BASE_LIBS})
${ARROW_STATIC_LINK_LIBS})

set(ARROW_LINK_LIBS
)
${ARROW_STATIC_LINK_LIBS})

set(ARROW_SHARED_PRIVATE_LINK_LIBS
${BOOST_SYSTEM_LIBRARY}
Expand Down Expand Up @@ -611,14 +613,6 @@ elseif (NOT MSVC)
${PTHREAD_LIBRARY})
endif()

if(RAPIDJSON_VENDORED)
set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} rapidjson_ep)
endif()

if(FLATBUFFERS_VENDORED)
set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} flatbuffers_ep)
endif()

############################################################
# Subdirectories
############################################################
Expand Down
9 changes: 9 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ if(ARROW_BUILD_BENCHMARKS)
endif()
endif()


if (ARROW_IPC)
# RapidJSON, header only dependency
if("${RAPIDJSON_HOME}" STREQUAL "")
Expand Down Expand Up @@ -365,6 +366,14 @@ if (ARROW_IPC)
set(FLATBUFFERS_VENDORED 0)
endif()

if(RAPIDJSON_VENDORED)
set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} rapidjson_ep)
endif()

if(FLATBUFFERS_VENDORED)
set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} flatbuffers_ep)
endif()

message(STATUS "Flatbuffers include dir: ${FLATBUFFERS_INCLUDE_DIR}")
message(STATUS "Flatbuffers compiler: ${FLATBUFFERS_COMPILER}")
include_directories(SYSTEM ${FLATBUFFERS_INCLUDE_DIR})
Expand Down

0 comments on commit 198dee1

Please sign in to comment.