Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Update build instructions.
Browse files Browse the repository at this point in the history
Also update travis ci to follow the same pattern as in the build
instructions.
  • Loading branch information
kalaxy committed Jan 12, 2016
1 parent 6709182 commit d096c64
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 28 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,24 @@ addons:
- pkg-config #needed for thrift cpp compilation

before_install:
- pushd thirdparty
- mkdir $HOME/build_dir
- cd $HOME/build_dir
- >
if [ $TRAVIS_OS_NAME == osx ]; then
brew update &&
brew install thrift lz4 snappy;
fi
- >
if [ $TRAVIS_OS_NAME == linux ]; then
./download_thirdparty.sh &&
./build_thirdparty.sh &&
export THRIFT_HOME=$TRAVIS_BUILD_DIR/thirdparty/installed SNAPPY_HOME=$TRAVIS_BUILD_DIR/thirdparty/installed LZ4_HOME=$TRAVIS_BUILD_DIR/thirdparty/installed;
cp -r $TRAVIS_BUILD_DIR/thirdparty . &&
./thirdparty/download_thirdparty.sh &&
./thirdparty/build_thirdparty.sh &&
export THRIFT_HOME=$HOME/build_dir/thirdparty/installed SNAPPY_HOME=$HOME/build_dir/thirdparty/installed LZ4_HOME=$HOME/build_dir/thirdparty/installed;
fi
- popd
before_script:
- export CC="gcc-4.9"
- export CXX="g++-4.9"
- mkdir build
- cd build
- cmake ..
- cmake $TRAVIS_BUILD_DIR

script: make
53 changes: 33 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,43 @@ Parquet-cpp [![Build Status](https://travis-ci.org/apache/parquet-cpp.svg)](http
===========
A C++ library to read parquet files.

To build you will need all the dependencies for thrift.

Then run:
<br>
<code>
./thirdparty/download_thirdparty.sh
</code>
<br>
<code>
./thirdparty/build_thirdparty.sh
</code>
<br>
<code>
THRIFT_HOME=$PWD/thirdparty/installed/ cmake -D CMAKE_PREFIX_PATH=$PWD/thirdparty/installed/ .
</code>
<br>
<code>
make
</code>
## Third Party Dependencies
- snappy
- lz4
- thrift 0.7+ [install instructions](https://thrift.apache.org/docs/install/)

Many package managers support some or all of these dependencies. E.g.:
```shell
ubuntu$ sudo apt-get install libboost-dev libsnappy-dev liblz4-dev
```
```shell
mac$ brew install boost snappy lz4 thrift
```

The thirdparty directory contains helper scripts to manually install third-party dependencies on Linux. You can use them like so.
- `mkdir <build-dir>`
- `cd <build-dir>`
- `cp -r <src-dir>/thirdparty .`
- `./thirdparty/download_thirdparty.sh`
- `./thirdparty/build_thirdparty.sh`
- Use the thirdparty/installed directory when configuring HOME dirs for dependencies.
Ex., `THRIFT_HOME=$PWD/thirdparty/installed SNAPPY_HOME=$PWD/thirdparty/installed LZ4_HOME=$PWD/thirdparty/installed cmake <source_dir>`

You can also take a look at our [.travis.yml](.travis.yml) to see how that build env is set up.


## Build
- `cmake .`
- You can customize dependent library locations through various environment variables:
- THRIFT_HOME customizes the thrift installed location.
- SNAPPY_HOME customizes the snappy installed location.
- LZ4_HOME customizes the lz4 installed location.
- `make`

The binaries will be built to ./debug which contains the libraries to link against as
well as a few example executables.

Incremental builds can be done afterwords with just <code> make </code>.
Incremental builds can be done afterwords with just `make`.

Design
========
Expand Down

0 comments on commit d096c64

Please sign in to comment.