Skip to content

Commit b34c786

Browse files
committed
Build programs as C++20
Use g++-14 for GitHub workflows, as ubuntu-latest is ubuntu-24.04 which uses g++-13 by default.
1 parent d5e7322 commit b34c786

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/workflows/check-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fetch-depth: 1
2424

2525
- name: Compile binary programs
26-
run: make pgms
26+
run: make CXX=g++-14 pgms
2727

2828
- name: Check for carriage returns
2929
run: |

.github/workflows/check-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fetch-depth: 1
2222

2323
- name: Compile binary programs
24-
run: make pgms
24+
run: make CXX=g++-14 pgms
2525

2626
# This avoids fetching the full git history, because it's slow.
2727
- name: Extract issue timestamps from published files

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: make dates
5252

5353
- name: Build programs
54-
run: make pgms -j 4
54+
run: make CXX=g++-14 pgms -j 4
5555

5656
- name: Generate HTML lists
5757
run: make lists

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The binaries that we want to build
22
PGMS := bin/lists bin/section_data bin/toc_diff bin/list_issues bin/set_status
3-
CXXFLAGS := -std=c++17 -Wall -g -O2 -D_GLIBCXX_ASSERTIONS
3+
CXXFLAGS := -std=c++20 -Wall -g -O2 -D_GLIBCXX_ASSERTIONS
44
CPPFLAGS := -MMD
55

66
# Running 'make debug' is equivalent to 'make DEBUG=1'

bin/build_pgms.bat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
echo "Use -m32 switch to force 32-bit build"
2-
g++ %* -std=c++17 -DNDEBUG -O2 -o bin/lists.exe src/date.cpp src/issues.cpp src/status.cpp src/sections.cpp src/mailing_info.cpp src/report_generator.cpp src/metadata.cpp src/lists.cpp
3-
g++ %* -std=c++17 -o bin/section_data.exe src/section_data.cpp
4-
g++ %* -std=c++17 -o bin/toc_diff.exe src/toc_diff.cpp
5-
g++ %* -std=c++17 -DNDEBUG -O2 -o bin/list_issues.exe src/date.cpp src/issues.cpp src/status.cpp src/sections.cpp src/metadata.cpp src/list_issues.cpp
6-
g++ %* -std=c++17 -DNDEBUG -O2 -o bin/set_status.exe src/set_status.cpp src/status.cpp
2+
g++ %* -std=c++20 -DNDEBUG -O2 -o bin/lists.exe src/date.cpp src/issues.cpp src/status.cpp src/sections.cpp src/mailing_info.cpp src/report_generator.cpp src/metadata.cpp src/lists.cpp
3+
g++ %* -std=c++20 -o bin/section_data.exe src/section_data.cpp
4+
g++ %* -std=c++20 -o bin/toc_diff.exe src/toc_diff.cpp
5+
g++ %* -std=c++20 -DNDEBUG -O2 -o bin/list_issues.exe src/date.cpp src/issues.cpp src/status.cpp src/sections.cpp src/metadata.cpp src/list_issues.cpp
6+
g++ %* -std=c++20 -DNDEBUG -O2 -o bin/set_status.exe src/set_status.cpp src/status.cpp
77

0 commit comments

Comments
 (0)