Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'runtime%': 'node',
'ros_lib_dir': "<!(node -p \"require('./scripts/config.js').getROSLibPath()\")",
'ros_include_root': "<!(node -p \"require('./scripts/config.js').getROSIncludeRootPath()\")",
'node_major_version': '<!(node -p \"process.versions.node.split(\'.\')[0]\")',
},
'targets': [
{
Expand Down Expand Up @@ -62,8 +63,21 @@
'defines': [
'OS_LINUX'
],
'cflags_cc': [
'-std=c++20'
'conditions': [
[
'node_major_version >= 23', {
'cflags': [
Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of 'cflags' under the condition for node_major_version >= 23 is inconsistent with the use of 'cflags_cc' for node_major_version < 23. Consider standardizing the flag key (likely using 'cflags_cc') to prevent potential build issues.

Suggested change
'cflags': [
'cflags_cc': [

Copilot uses AI. Check for mistakes.
'-std=c++20'
]
}
],
[
'node_major_version < 23', {
'cflags_cc': [
'-std=c++17'
]
}
]
]
}
],
Expand All @@ -72,8 +86,21 @@
'defines': [
'OS_WINDOWS'
],
'cflags_cc': [
'-std=c++20'
'conditions': [
[
'node_major_version >= 23', {
'cflags': [
'-std=c++20'
]
}
],
[
'node_major_version < 23', {
'cflags_cc': [
'-std=c++17'
]
}
]
],
'include_dirs': [
'./src/third_party/dlfcn-win32/',
Expand Down
Loading