diff --git a/.travis.yml b/.travis.yml index db2fdcef..96eab0e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,5 @@ compiler: - gcc before_install: - sudo apt-get install libboost-regex1.48-dev -install: script/configure.sh -D USE_BOOST_REGEX +install: script/configure.sh -D USE_BOOST_REGEX=true -D USE_LIBPROFILER=false script: script/test_all.sh diff --git a/script/configure.sh b/script/configure.sh index a06c5f40..214ec82a 100755 --- a/script/configure.sh +++ b/script/configure.sh @@ -11,10 +11,14 @@ if [ "$1" == "-h" ]; then 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. +-D USE_BOOST_REGEX=true + 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. + +-D USE_LIBPROFILER=false + Don't link libprofiler into the test binaries. This flag is needed on systems + where libprofiler (from the google-perftools package) is not installed. HELP fi diff --git a/tests.gyp b/tests.gyp index bb78a38e..613b2c19 100644 --- a/tests.gyp +++ b/tests.gyp @@ -65,7 +65,14 @@ '-std=c++0x', ], - 'libraries': ['-weak-lprofiler'], + 'variables': { + 'USE_LIBPROFILER%': 'true', + }, + 'conditions': [ + ['USE_LIBPROFILER != "false"', { + 'libraries': ['-lprofiler'], + }] + ], 'xcode_settings': { 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',