mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Merge pull request #6874 from evsh/no-old-style-cast
Disable warnings in the bundled QtSingleAppplication and fix CMake builds in Travis
This commit is contained in:
commit
ace68d4961
2 changed files with 20 additions and 13 deletions
29
.travis.yml
29
.travis.yml
|
@ -55,24 +55,20 @@ addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
||||||
#- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
#- boost-latest
|
#- boost-latest
|
||||||
- sourceline: 'ppa:qbittorrent-team/qbittorrent-stable'
|
- sourceline: 'ppa:qbittorrent-team/qbittorrent-stable'
|
||||||
- sourceline: 'ppa:beineri/opt-qt551-trusty'
|
- sourceline: 'ppa:beineri/opt-qt551-trusty'
|
||||||
- sourceline: 'ppa:adrozdoff/cmake'
|
- sourceline: 'ppa:adrozdoff/cmake'
|
||||||
packages:
|
packages:
|
||||||
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
||||||
- autoconf
|
- [autoconf, automake, colormake]
|
||||||
- automake
|
- [cmake, ninja-build]
|
||||||
- cmake
|
|
||||||
- colormake
|
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libboost-dev
|
- [libboost-dev, libboost-system-dev]
|
||||||
- libboost-system-dev
|
|
||||||
- libtorrent-rasterbar-dev
|
- libtorrent-rasterbar-dev
|
||||||
# Qt 5.5.1
|
- [qt55base, qt55tools]
|
||||||
- qt55base
|
- [gcc-6, g++-6]
|
||||||
- qt55tools
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# only allow specific build for coverity scan, others will stop
|
# only allow specific build for coverity scan, others will stop
|
||||||
|
@ -94,6 +90,11 @@ before_install:
|
||||||
|
|
||||||
# Qt 5
|
# Qt 5
|
||||||
PATH=/opt/qt55/bin:${PATH}
|
PATH=/opt/qt55/bin:${PATH}
|
||||||
|
|
||||||
|
if [ "$build_system" = "cmake" ]; then
|
||||||
|
COMPILER_VERSION=6
|
||||||
|
export CXX="${CXX}-${COMPILER_VERSION}" CC="${CC}-${COMPILER_VERSION}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# print settings
|
# print settings
|
||||||
|
@ -143,7 +144,7 @@ install:
|
||||||
|
|
||||||
if [ "$build_system" = "cmake" ]; then
|
if [ "$build_system" = "cmake" ]; then
|
||||||
brew unlink cmake
|
brew unlink cmake
|
||||||
brew install cmake
|
brew install cmake ninja
|
||||||
|
|
||||||
brew install qt5
|
brew install qt5
|
||||||
brew link --force qt5
|
brew link --force qt5
|
||||||
|
@ -175,7 +176,8 @@ script:
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DGUI=${gui} -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
cmake -DGUI=${gui} -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
||||||
-G "Unix Makefiles" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
|
-G "Ninja" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
|
||||||
|
BUILD_TOOL="ninja"
|
||||||
fi
|
fi
|
||||||
if [ "$build_system" = "qmake" ]; then
|
if [ "$build_system" = "qmake" ]; then
|
||||||
./bootstrap.sh && ./configure $qbtconf
|
./bootstrap.sh && ./configure $qbtconf
|
||||||
|
@ -184,8 +186,9 @@ script:
|
||||||
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
|
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
|
||||||
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile
|
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile
|
||||||
fi
|
fi
|
||||||
|
BUILD_TOOL="make"
|
||||||
fi
|
fi
|
||||||
- make && make install
|
- $BUILD_TOOL && $BUILD_TOOL install
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
|
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
|
||||||
|
|
|
@ -20,6 +20,10 @@ add_library(qtsingleapplication ${QBT_QTSINGLEAPPLICATION_HEADERS} ${QBT_QTSINGL
|
||||||
target_include_directories(qtsingleapplication INTERFACE "${qtsingleapplication_SOURCE_DIR}")
|
target_include_directories(qtsingleapplication INTERFACE "${qtsingleapplication_SOURCE_DIR}")
|
||||||
target_link_qt_components(qtsingleapplication Network)
|
target_link_qt_components(qtsingleapplication Network)
|
||||||
|
|
||||||
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
|
target_compile_options(qtsingleapplication PRIVATE "-w") # disable warning for 3rdparty code
|
||||||
|
endif()
|
||||||
|
|
||||||
if (GUI)
|
if (GUI)
|
||||||
target_link_qt_components(qtsingleapplication Widgets)
|
target_link_qt_components(qtsingleapplication Widgets)
|
||||||
endif (GUI)
|
endif (GUI)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue