Skip to content

Commit

Permalink
Merge pull request #15 from mapbox/clang38
Browse files Browse the repository at this point in the history
Install clang via mason
  • Loading branch information
yhahn committed Jun 24, 2016
2 parents e78c92f + 451a4e4 commit a8d94af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .mason
Submodule .mason updated 100 files
16 changes: 13 additions & 3 deletions .travis.yml
Expand Up @@ -10,13 +10,23 @@ matrix:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-5' ]
- os: linux
env: CXX=clang++-3.7
env: CXX=clang++-3.8
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7' ]
packages: [ 'clang-3.7' ]
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ libstdc++-5-dev', 'libstdc++6', 'g++-5' ]

cache: apt

install:
- |
if [[ ${CXX} =~ "clang" ]] && [[ $(uname -s) == "Linux" ]]; then
./.mason/mason install clang 3.8.0
CLANG_PREFIX=$(./.mason/mason prefix clang 3.8.0)
export PATH=${CLANG_PREFIX}/bin:${PATH}
which clang++
clang++ -v
fi
script:
- make test
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -10,15 +10,15 @@ RAPIDJSON_DEP = `$(MASON) cflags $(RAPIDJSON)`

default: build/libgeojson.a

mason_packages:
mason_packages/headers/geometry:
$(MASON) install $(VARIANT)
$(MASON) install $(GEOMETRY)
$(MASON) install $(RAPIDJSON)

build:
mkdir -p build

build/geojson.o: src/mapbox/geojson.cpp include/mapbox/geojson.hpp build mason_packages Makefile
build/geojson.o: src/mapbox/geojson.cpp include/mapbox/geojson.hpp build mason_packages/headers/geometry Makefile
$(CXX) $(CFLAGS) $(CXXFLAGS) $(DEPS) $(RAPIDJSON_DEP) -c $< -o $@

build/libgeojson.a: build/geojson.o
Expand Down

0 comments on commit a8d94af

Please sign in to comment.