Skip to content

Commit 819a84e

Browse files
committed
Implement proper C++11 mode detection
Newer compilers have C++14 mode as default and package maintainers tend to not specifying a C++ version when building a package, this causes compatibility issues when (for example) qbt is compiled in C++11 and dependency lib is in C++14. See issue qbittorrent#9485. What this commit does: 1. Checks if compiler supports at least C++11 2. Checks if compiler is set in at least C++11 mode
1 parent 019da6a commit 819a84e

4 files changed

Lines changed: 251 additions & 159 deletions

File tree

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ script:
158158
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
159159
# For some reason for RC_1_1 we need to also specify the OpenSSL compiler/linker flags
160160
# Homebrew doesn't symlink OpenSSL for security reasons
161-
./bootstrap.sh && ./configure $qbtconf CXXFLAGS="$(PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --cflags openssl)" LDFLAGS="$(PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --libs openssl)"
161+
./bootstrap.sh
162+
./configure $qbtconf CXXFLAGS="$CXXFLAGS $(PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --cflags openssl) -std=c++14" \
163+
LDFLAGS="$LDFLAGS $(PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --libs openssl)"
162164
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
163165
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
164166
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile

0 commit comments

Comments
 (0)