Repository: parquet-cpp
Updated Branches:
refs/heads/master 4a1c2c47c -> b69669a23
PARQUET-1105: Remove libboost_system dependency for non MSVC
Author: Deepak Majeti <deepak.majeti@hpe.com>
Closes #406 from majetideepak/PARQUET-1105 and squashes the following commits:
cafd464 [Deepak Majeti] PARQUET-1105: Remove libboost_system dependency for non MSVC
Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/b69669a2
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/b69669a2
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/b69669a2
Branch: refs/heads/master
Commit: b69669a230e59e36a193b679fc2c5b4d9150f8c9
Parents: 4a1c2c4
Author: Deepak Majeti <deepak.majeti@hpe.com>
Authored: Thu Sep 28 15:43:49 2017 +0200
Committer: Uwe L. Korn <uwe@apache.org>
Committed: Thu Sep 28 15:43:49 2017 +0200
----------------------------------------------------------------------
CMakeLists.txt | 11 +++++++--
cmake_modules/ThirdpartyToolchain.cmake | 37 +++++++++++++++++++---------
2 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/b69669a2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca37b5f..c6989fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -497,10 +497,17 @@ endif()
if (PARQUET_BOOST_USE_SHARED)
set(BOOST_LINK_LIBS
boost_shared_regex)
+ if(MSVC)
+ set(BOOST_LINK_LIBS ${BOOST_LINK_LIBS}
+ boost_shared_system)
+ endif()
else()
set(BOOST_LINK_LIBS
- boost_static_regex
- boost_static_system)
+ boost_static_regex)
+ if(MSVC)
+ set(BOOST_LINK_LIBS ${BOOST_LINK_LIBS}
+ boost_static_system)
+ endif()
endif()
#############################################################
http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/b69669a2/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 3662540..4de3089 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -68,26 +68,40 @@ if (PARQUET_BOOST_USE_SHARED)
# force all boost libraries to dynamic link
add_definitions(-DBOOST_ALL_DYN_LINK)
+ find_package(Boost COMPONENTS regex system REQUIRED)
+ else()
+ find_package(Boost COMPONENTS regex REQUIRED)
endif()
- find_package(Boost COMPONENTS regex system REQUIRED)
if ("${UPPERCASE_BUILD_TYPE}" STREQUAL "DEBUG")
set(BOOST_SHARED_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_DEBUG})
- set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG})
+ if (MSVC)
+ set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG})
+ endif()
else()
set(BOOST_SHARED_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_RELEASE})
- set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE})
+ if (MSVC)
+ set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE})
+ endif()
endif()
else()
# Find static Boost libraries.
set(Boost_USE_STATIC_LIBS ON)
- find_package(Boost COMPONENTS regex system REQUIRED)
+ if (MSVC)
+ find_package(Boost COMPONENTS regex system REQUIRED)
+ else()
+ find_package(Boost COMPONENTS regex REQUIRED)
+ endif()
if ("${UPPERCASE_BUILD_TYPE}" STREQUAL "DEBUG")
set(BOOST_STATIC_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_DEBUG})
- set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG})
+ if (MSVC)
+ set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG})
+ endif()
else()
set(BOOST_STATIC_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_RELEASE})
- set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE})
+ if (MSVC)
+ set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE})
+ endif()
endif()
endif()
@@ -102,19 +116,18 @@ if (PARQUET_BOOST_USE_SHARED)
set_target_properties(boost_shared_regex
PROPERTIES IMPORTED_LOCATION "${BOOST_SHARED_REGEX_LIBRARY}")
endif()
- add_library(boost_shared_system SHARED IMPORTED)
if (MSVC)
+ add_library(boost_shared_system SHARED IMPORTED)
set_target_properties(boost_shared_system
PROPERTIES IMPORTED_IMPLIB "${BOOST_SHARED_SYSTEM_LIBRARY}")
- else()
- set_target_properties(boost_shared_system
- PROPERTIES IMPORTED_LOCATION "${BOOST_SHARED_SYSTEM_LIBRARY}")
endif()
else()
add_library(boost_static_regex STATIC IMPORTED)
set_target_properties(boost_static_regex PROPERTIES IMPORTED_LOCATION ${BOOST_STATIC_REGEX_LIBRARY})
- add_library(boost_static_system STATIC IMPORTED)
- set_target_properties(boost_static_system PROPERTIES IMPORTED_LOCATION ${BOOST_STATIC_SYSTEM_LIBRARY})
+ if (MSVC)
+ add_library(boost_static_system STATIC IMPORTED)
+ set_target_properties(boost_static_system PROPERTIES IMPORTED_LOCATION ${BOOST_STATIC_SYSTEM_LIBRARY})
+ endif()
endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|