mirror of
https://github.com/transmission/transmission.git
synced 2026-02-15 07:26:49 +00:00
Fix building transmission with C++23 (#6832)
* fix: operator== should return bool in tr_strbuf Fixes build error with C++20/C++23 error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool' Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: explicitly specify Blocklist::size() return type as size_t Fixes building with C++20/C++23 error: no matching function for call to 'size' function 'size' with deduced return type cannot be used before it is defined Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: wrap runtime format strings with fmt::runtime in library, daemon and cli fmt::format_string ctor is consteval with C++20 See https://github.com/fmtlib/fmt/issues/2438 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: wrap runtime format strings with fmt::runtime for GTK client Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: allow to override C and CXX standard via cmdline or env Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: add job to check if transmission compiles with C++23 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * Address code review by mikedld Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix new found fmt build errors Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * Address code review by tearfur Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> * fix: make tr_net_init_mgr singleton buildable with C++23 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> --------- Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
committed by
GitHub
parent
24f58f70ee
commit
7e87adcd91
64
.github/workflows/actions.yml
vendored
64
.github/workflows/actions.yml
vendored
@@ -1028,3 +1028,67 @@ jobs:
|
||||
working-directory: ./android
|
||||
run: |
|
||||
gradle build
|
||||
|
||||
ubuntu-24-04-cxx-23:
|
||||
needs: [ what-to-make ]
|
||||
if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Show Configuration
|
||||
run: |
|
||||
echo '${{ toJSON(needs) }}'
|
||||
echo '${{ toJSON(runner) }}'
|
||||
cat /etc/os-release
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
set -ex
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
appstream \
|
||||
ca-certificates \
|
||||
clang \
|
||||
cmake \
|
||||
gettext \
|
||||
libcurl4-openssl-dev \
|
||||
libdeflate-dev \
|
||||
libevent-dev \
|
||||
libfmt-dev \
|
||||
libminiupnpc-dev \
|
||||
libnatpmp-dev \
|
||||
libpsl-dev \
|
||||
libssl-dev \
|
||||
ninja-build
|
||||
- name: Get Dependencies (GTK)
|
||||
if: ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
|
||||
run: sudo apt-get install -y --no-install-recommends libglibmm-2.4-dev libgtkmm-3.0-dev
|
||||
- name: Get Dependencies (Qt)
|
||||
if: ${{ needs.what-to-make.outputs.make-qt == 'true' }}
|
||||
run: sudo apt-get install -y --no-install-recommends qtbase5-dev libqt5svg5-dev qttools5-dev
|
||||
- name: Get Source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
path: src
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-S src \
|
||||
-B obj \
|
||||
-G Ninja \
|
||||
-DCMAKE_CXX_STANDARD=23 \
|
||||
-DCMAKE_CXX_COMPILER='clang++' \
|
||||
-DCMAKE_C_COMPILER='clang' \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=pfx \
|
||||
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_MAC=OFF \
|
||||
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
|
||||
-DREBUILD_WEB=OFF \
|
||||
-DENABLE_WERROR=ON \
|
||||
-DRUN_CLANG_TIDY=OFF
|
||||
- name: Make
|
||||
run: cmake --build obj --config RelWithDebInfo -- "-k 0"
|
||||
|
||||
Reference in New Issue
Block a user