Link against libboost_regex correctly on travis
This commit is contained in:
parent
cad6122295
commit
02f3fe2b04
3 changed files with 24 additions and 5 deletions
|
|
@ -3,7 +3,5 @@ compiler:
|
|||
- gcc
|
||||
before_install:
|
||||
- sudo apt-get install libboost-regex1.48-dev
|
||||
env:
|
||||
- CXXFLAGS='-D USE_BOOST_REGEX' LDFLAGS='-lboost_regex'
|
||||
install: script/configure.sh
|
||||
install: script/configure.sh -D USE_BOOST_REGEX
|
||||
script: script/test.sh
|
||||
|
|
|
|||
|
|
@ -3,5 +3,17 @@
|
|||
set -e
|
||||
|
||||
git submodule update --init
|
||||
externals/gyp/gyp tree_sitter.gyp --depth .
|
||||
externals/gyp/gyp tree_sitter.gyp --depth . --format=make
|
||||
externals/gyp/gyp tree_sitter.gyp --depth . --format=make $@
|
||||
|
||||
if [ $1 == "-h" ]; then
|
||||
cat <<-HELP
|
||||
|
||||
Variables:
|
||||
|
||||
-D USE_BOOST_REGEX - Use boost regex library for tests, not the built-in regex
|
||||
library. This is useful when linking against an older
|
||||
version of the standard library. libboost_regex must be
|
||||
installed.
|
||||
|
||||
HELP
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -63,6 +63,15 @@
|
|||
'examples',
|
||||
'spec/runtime',
|
||||
],
|
||||
'variables': {
|
||||
'USE_BOOST_REGEX%': 'false',
|
||||
},
|
||||
'conditions': [
|
||||
['USE_BOOST_REGEX != "false"', {
|
||||
'defines': ['USE_BOOST_REGEX'],
|
||||
'libraries': ['-lboost_regex'],
|
||||
}]
|
||||
],
|
||||
'sources': [
|
||||
'<!@(find spec/runtime -name "*.h" -or -name "*.cc")',
|
||||
'<!@(find examples/parsers -name "*.c")',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue