REM Need to build arrow-cpp with MSVC 14.0 (2015)
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

mkdir "%SRC_DIR%"\cpp\build
pushd "%SRC_DIR%"\cpp\build

cmake -G "Ninja" ^
      -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
      -DARROW_DEPENDENCY_SOURCE=SYSTEM ^
      -DARROW_PACKAGE_PREFIX="%LIBRARY_PREFIX%" ^
      -DLLVM_TOOLS_BINARY_DIR="%LIBRARY_BIN%" ^
      -DPYTHON_EXECUTABLE="%PYTHON%" ^
      -DARROW_WITH_BZ2:BOOL=ON ^
      -DARROW_WITH_ZLIB:BOOL=ON ^
      -DARROW_WITH_ZSTD:BOOL=ON ^
      -DARROW_WITH_LZ4:BOOL=ON ^
      -DARROW_WITH_SNAPPY:BOOL=OFF ^
      -DARROW_WITH_BROTLI:BOOL=OFF ^
      -DARROW_BOOST_USE_SHARED:BOOL=OFF ^
      -DARROW_BUILD_TESTS:BOOL=OFF ^
      -DARROW_BUILD_UTILITIES:BOOL=OFF ^
      -DARROW_BUILD_STATIC:BOOL=OFF ^
      -DCMAKE_BUILD_TYPE=release ^
      -DARROW_SSE42:BOOL=OFF ^
      -DARROW_PYTHON:BOOL=ON ^
      -DARROW_MIMALLOC:BOOL=OFF ^
      -DARROW_DATASET:BOOL=OFF ^
      -DARROW_FLIGHT:BOOL=OFF ^
      -DARROW_HDFS:BOOL=ON ^
      -DARROW_PARQUET:BOOL=ON ^
      -DARROW_GANDIVA:BOOL=OFF ^
      -DARROW_ORC:BOOL=OFF ^
      -DARROW_S3:BOOL=OFF ^
      -DBoost_NO_BOOST_CMAKE=OFF ^
      -DCMAKE_UNITY_BUILD=OFF ^
      ..
if errorlevel 1 exit 1

cmake --build . --target install --config Release
if errorlevel 1 exit 1

popd
