Skip to content

Commit be22322

Browse files
committed
Fix clang warnings on linux travis build.
By passing the original file to *clang* when the preprocessed file is not found in the cache. The [-Wself-assign] warnings are caused by macro expansion in the preprocessed file. *Clang* is smart enough not to emit false warnings on the original files. Not necessary for *osx* since the brewfile *ccache* is already at 3.4.1. Since ccache 3.3 `CCACHE_CPP2` defaults to TRUE. Travis linux however is still at 3.1.9 hence the need for exporting this variable.
1 parent 9eaccb5 commit be22322

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎.travis.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ before_install:
2929
- if [ $TRAVIS_OS_NAME == linux ]; then mkdir $TRAVIS_BUILD_DIR/dependency-prefix; fi
3030
- if [ $TRAVIS_OS_NAME == linux ]; then export PKG_CONFIG_PATH=$TRAVIS_BUILD_DIR/dependency-prefix/lib/pkgconfig; fi
3131
- if [ $TRAVIS_OS_NAME == osx ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
32+
- if [ $TRAVIS_OS_NAME == linux ] && [ $TRAVIS_COMPILER == clang ]; then export CCACHE_CPP2=yes; fi
3233

3334
install:
3435
- if [ $TRAVIS_OS_NAME == linux ]; then bash scripts/compile_YAML-CPP.travis; fi

0 commit comments

Comments
 (0)