correct extconf to respect CXX flag

This commit is contained in:
Sam 2016-05-14 17:00:40 +10:00
parent bdd0260461
commit 3a68f7c44d
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
language: ruby
env:
- CXX=g++-4.8 CC=gcc-4.8
- CXX=g++-4.8
rvm:
- 2.0
- 2.1
@ -8,13 +8,10 @@ rvm:
- 2.3.1
before_install:
- gem install bundler -v 1.12.0
- update-alternatives --auto g++
- update-alternatives --auto gcc
cache: bundler
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8

View File

@ -10,6 +10,11 @@ $CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFO
$CPPFLAGS += " -std=c++0x"
$CPPFLAGS += " -fpermissive"
if ENV['CXX']
puts "SETTING CXX"
CONFIG['CXX'] = ENV['CXX']
end
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
if CONFIG['warnflags']
CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')