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

[not ready] Switch to C++14 standard #153

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ addons:
- ubuntu-toolchain-r-test
packages:
- coreutils
- g++-4.8
- g++-5
- gdb

# TODO: no core files on sudo:false machines until https://github.com/travis-ci/travis-ci/issues/3754 is resolved
Expand All @@ -32,16 +32,19 @@ matrix:
env: NODE="0.10" TARGET=Debug PUBLISHABLE=true
# OS X
- os: osx
osx_image: xcode7.3
compiler: clang
env: NODE="4" TARGET=Release PUBLISHABLE=true
- os: osx
osx_image: xcode7.3
compiler: clang
env: NODE="0.10" TARGET=Release PUBLISHABLE=true
- os: osx
compiler: clang
env: NODE="0.10" TARGET=Debug PUBLISHABLE=true
# Coverage
- os: osx
osx_image: xcode7.3
compiler: clang
env: NODE="0.10" COVERAGE=true TARGET=Debug PUBLISHABLE=false

Expand All @@ -56,8 +59,13 @@ before_install:
- export COVERAGE=${COVERAGE:-false}
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
export CXX="g++-4.8";
export CC="gcc-4.8";
export CXX="g++-5";
export CC="gcc-5";
export CPP="cpp-5";
# GCC binutils wrapper for potential use with LTO (-flto)
export AR="gcc-ar-5"
export NM="gcc-nm-5"
export RANLIB="gcc-ranlib-5"
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python2.7/site-packages;
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
sudo sysctl -w kern.sysv.shmmax=4294967296
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Provides read-only bindings to the [Open Source Routing Machine - OSRM](https://
# Depends

- Node.js v0.10.x or v0.12.x
- Modern C++ runtime libraries supporting C++11
- Modern C++ runtime libraries supporting C++14

C++11 capable platforms include:
C++14 capable platforms include:

- Mac OS X >= 10.8
- Ubuntu Linux >= 14.04 or other Linux distributions with g++ >= 4.8 toolchain (>= GLIBC_2.17 from libc and >= GLIBCXX_3.4.17 from libstdc++)
- Ubuntu Linux >= 14.04 or other Linux distributions with g++ >= 4.9 toolchain (>= GLIBC_2.17 from libc and >= GLIBCXX_3.4.17 from libstdc++)

An installation error like below indicates your system does not have a modern enough g++ toolchain:

Expand All @@ -29,7 +29,7 @@ If you are running Ubuntu older than 14.04 you can easily upgrade your g++ toolc
```
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8
sudo apt-get install g++-5
```


Expand Down
4 changes: 2 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'conditions': [
[ 'OS=="linux"', {
'cflags_cc' : [
'-std=c++11'
'-std=c++14'
],
'libraries':[
'-Wl,-rpath=<!@(pkg-config libosrm --variable=libdir)',
Expand All @@ -38,7 +38,7 @@
['OS=="mac"', {
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'OTHER_LDFLAGS':[
Expand Down
3 changes: 2 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ function build_osrm() {
-DCMAKE_INCLUDE_PATH=${MASON_HOME}/include \
-DCMAKE_LIBRARY_PATH=${MASON_HOME}/lib \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_EXE_LINKER_FLAGS="${LINK_FLAGS}"
-DCMAKE_EXE_LINKER_FLAGS="${LINK_FLAGS}" \
-DENABLE_CCACHE=OFF
make -j${JOBS} && make install
popd

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "http://project-osrm.org",
"author": "Dane Springmeyer <springmeyer>",
"version": "4.9.0-develop.0",
"osrm_release" : "develop",
"osrm_release" : "c++14",
"main": "./lib/osrm.js",
"license": "BSD",
"bugs": {
Expand Down