A convenient and tested way to set up thirdparty dependencies is to use the conda package manager. Please feel free to extend this document with others ways to setup development environment for parquet-cpp.
Miniconda is a minimal Python distribution including the conda package manager. To get started, download and install a 64-bit distribution.
We recommend using packages from conda-forge. Launch cmd.exe and run following to bootstrap a build environment:
conda create -n parquet-dev cmake git boost-cpp curl zlib snappy arrow-cpp brotli thrift-cpp -c conda-forge
To allow cmake to pick up 3rd party dependencies, you should set PARQUET_BUILD_TOOLCHAIN
environment variable to contain Library
folder path of new created on previous step parquet-dev
conda environment. For instance, if Miniconda
was installed to default destination, Library
folder path for parquet-dev
conda environment will be as following:
C:\Users\YOUR_USER_NAME\Miniconda3\envs\parquet-dev\Library
As alternative to PARQUET_BUILD_TOOLCHAIN
, it's possible to configure path to each 3rd party dependency separately by setting appropriate environment variable:
BOOST_ROOT
variable with path to boost
installationTHRIFT_HOME
variable with path to thrift-cpp
installationSNAPPY_HOME
variable with path to snappy
installationZLIB_HOME
variable with path to zlib
installationBROTLI_HOME
variable with path to brotli
installationARROW_HOME
variable with path to arrow
installation
Microsoft provides the free Visual Studio Community edition. Once you have Visual Studio installed, you should configure cmd.exe environment to be able to find Visual Studio's build toolchain by running following commands:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64
It's easiest to configure a console emulator like cmder to automatically launch this when starting a new development console.
Activate your conda build environment:
activate parquet-dev
Change working directory in cmd.exe to the root directory of parquet-cpp and do an out of source build using nmake
:
cd %PARQUET_ROOT_SOURCES_DIRECTORY% mkdir build cd build cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release .. nmake
Activate your conda build environment:
activate parquet-dev
Change working directory in cmd.exe to the root directory of parquet-cpp and do an out of source build:
cd %PARQUET_ROOT_SOURCES_DIRECTORY% mkdir build cd build cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=Release .. cmake --build . --config Release
When using conda, only release builds are currently supported.