Skip to content

Commit

Permalink
Adapt C++20 (#1020)
Browse files Browse the repository at this point in the history
Currently, we adapt C++17 to compile the C++ addon, but nodejs 23.X needs C++20 to develop addon, this patch:

1. Adapt C++20 for Windows & Linux platforms, keeping macOS as C++17.
2. Add checking for nodejs 23.X into actions for Linux platform.

Fix: #1019
  • Loading branch information
minggangw authored Jan 21, 2025
1 parent 48bec86 commit 2208a1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [20.X, 22.X]
node-version: [20.X, 22.X, 23.X]
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
4 changes: 2 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'OS_LINUX'
],
'cflags_cc': [
'-std=c++17'
'-std=c++20'
],
'include_dirs':
[
Expand Down Expand Up @@ -104,7 +104,7 @@
'OS_WINDOWS'
],
'cflags_cc': [
'-std=c++17'
'-std=c++20'
],
'include_dirs': [
'./src/third_party/dlfcn-win32/',
Expand Down

0 comments on commit 2208a1c

Please # to comment.