parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-996: Improve MSVC build - ThirdpartyToolchain - Arrow
Date Tue, 23 May 2017 18:29:37 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 2f351f889 -> bac81a7a6


PARQUET-996: Improve MSVC build - ThirdpartyToolchain - Arrow

- Fix LIBRARY_SUFFIX for ARROW_STATIC_LIB.
- Replace hardcoded "NMake Makefiles" by ${CMAKE_GENERATOR} and fix DEPENDEES for arrow_ep
copy_dll_step
- Merge versioned by MSVC ExternalProject_Add(arrow_ep and split pre/post-3.7-cmake configurations.

Author: rip.nsk <rip.nsk@gmail.com>

Closes #339 from rip-nsk/PARQUET-996 and squashes the following commits:

50d091f [rip.nsk] Cleanup
8be2f6f [rip.nsk] Merge versioned by MSVC ExternalProject_Add(arrow_ep and split pre/post-3.7-cmake
configurations.
53d7ef1 [rip.nsk] Replace harcoded "NMake Makefiles" by ${CMAKE_GENERATOR} and fix DEPENDEES
for arrow_ep copy_dll_step
4baf6ad [rip.nsk] Fix LIBRARY_SUFFIX for ARROW_STATIC_LIB.


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/bac81a7a
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/bac81a7a
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/bac81a7a

Branch: refs/heads/master
Commit: bac81a7a6e13aa28f8b828e336dd80f84950cdcc
Parents: 2f351f8
Author: rip.nsk <rip.nsk@gmail.com>
Authored: Tue May 23 14:29:32 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Tue May 23 14:29:32 2017 -0400

----------------------------------------------------------------------
 cmake_modules/FindArrow.cmake           |  2 +-
 cmake_modules/ThirdpartyToolchain.cmake | 48 ++++++++++------------------
 2 files changed, 17 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/bac81a7a/cmake_modules/FindArrow.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindArrow.cmake b/cmake_modules/FindArrow.cmake
index bd6765a..eb1dfca 100644
--- a/cmake_modules/FindArrow.cmake
+++ b/cmake_modules/FindArrow.cmake
@@ -78,7 +78,7 @@ else()
     endif()
 
     get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY)
-    set(ARROW_STATIC_LIB ${ARROW_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ARROW_LIB_NAME}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_STATIC_LIB ${ARROW_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ARROW_LIB_NAME}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
     set(ARROW_SHARED_LIB ${ARROW_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
     set(ARROW_SHARED_IMPLIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.lib)
   endif ()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/bac81a7a/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index edbb961..b324ffb 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -499,7 +499,8 @@ if (NOT ARROW_FOUND)
     set(ARROW_STATIC_LIB "${ARROW_LIB_DIR}/libarrow.a")
   endif()
 
-  set(ARROW_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+  set(ARROW_CMAKE_ARGS
+    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
     -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
     -DCMAKE_INSTALL_PREFIX=${ARROW_PREFIX}
@@ -510,10 +511,7 @@ if (NOT ARROW_FOUND)
     -DARROW_BUILD_TESTS=OFF)
 
   if (MSVC)
-    set(ARROW_CMAKE_ARGS -G "NMake Makefiles" -DARROW_CXXFLAGS="/WX" ${ARROW_CMAKE_ARGS})
-    if (NOT PARQUET_BOOST_USE_SHARED)
-      set(ARROW_CMAKE_ARGS -DARROW_BOOST_USE_SHARED=OFF ${ARROW_CMAKE_ARGS})
-    endif()
+    set(ARROW_CMAKE_ARGS -DARROW_CXXFLAGS="/WX" ${ARROW_CMAKE_ARGS})
   endif()
 
   if ("$ENV{PARQUET_ARROW_VERSION}" STREQUAL "")
@@ -528,37 +526,23 @@ if (NOT ARROW_FOUND)
   if (CMAKE_VERSION VERSION_GREATER "3.2")
     set(ARROW_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}" "${ARROW_STATIC_LIB}")
   endif()
+  if (CMAKE_VERSION VERSION_GREATER "3.7")
+    set(ARROW_CONFIGURE SOURCE_SUBDIR "cpp" CMAKE_ARGS ${ARROW_CMAKE_ARGS})
+  else()
+    set(ARROW_CONFIGURE CONFIGURE_COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}"
+      ${ARROW_CMAKE_ARGS} "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp")
+  endif()
+
+  ExternalProject_Add(arrow_ep
+    URL ${ARROW_URL}
+    ${ARROW_CONFIGURE}
+    ${ARROW_BUILD_BYPRODUCTS})
 
   if (MSVC)
-    ExternalProject_Add(arrow_ep
-      URL ${ARROW_URL}
-      ${ARROW_BUILD_BYPRODUCTS}
-      # With CMake 3.7.0 there is a SOURCE_SUBDIR argument which we can use
-      # to specify that the CMakeLists.txt of Arrow is located in cpp/
-      #
-      # See https://gitlab.kitware.com/cmake/cmake/commit/a8345d65f359d75efb057d22976cfb92b4d477cf
-      CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
-      CMAKE_GENERATOR "NMake Makefiles"
-      CMAKE_GENERATOR_PLATFORM "x64"
-      BUILD_COMMAND nmake COMMAND nmake install
-      STEP_TARGETS copy_dll_step)
-
-    ExternalProject_Get_Property(arrow_ep SOURCE_DIR)
     ExternalProject_Add_Step(arrow_ep copy_dll_step
+      DEPENDEES install
       COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_OUTPUT_ROOT_DIRECTORY}
-      COMMAND ${CMAKE_COMMAND} -E copy ${ARROW_SHARED_LIB} ${BUILD_OUTPUT_ROOT_DIRECTORY}
-      DEPENDEES build
-      WORKING_DIRECTORY ${SOURCE_DIR})
-  else()
-    ExternalProject_Add(arrow_ep
-      URL ${ARROW_URL}
-      ${ARROW_BUILD_BYPRODUCTS}
-      # With CMake 3.7.0 there is a SOURCE_SUBDIR argument which we can use
-      # to specify that the CMakeLists.txt of Arrow is located in cpp/
-      #
-      # See https://gitlab.kitware.com/cmake/cmake/commit/a8345d65f359d75efb057d22976cfb92b4d477cf
-      CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
-      CMAKE_ARGS ${ARROW_CMAKE_ARGS})
+      COMMAND ${CMAKE_COMMAND} -E copy ${ARROW_SHARED_LIB} ${BUILD_OUTPUT_ROOT_DIRECTORY})
   endif()
   set(ARROW_VENDORED 1)
 else()


Mime
View raw message