FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/utils/defaultCxxStandard.js at master · nodejs-experiments/nodegit · GitHub
nodejs-experiments
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
utils
/
defaultCxxStandard.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (15 loc) · 577 Bytes
Breadcrumbs
nodegit
/
utils
/
defaultCxxStandard.js
Copy path
File metadata and controls
18 lines (15 loc) · 577 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const
targetSpecified
=
process
.
argv
[
2
]
!==
'none'
;
let
isNode18OrElectron20AndUp
=
false
;
if
(
targetSpecified
)
{
// Assume electron if target is specified.
// If building node 18 / 19 via target, will need to specify C++ standard manually
const
majorVersion
=
process
.
argv
[
2
]
.
split
(
'.'
)
[
0
]
;
isNode18OrElectron20AndUp
=
majorVersion
>=
20
;
}
else
{
// Node 18 === 108
isNode18OrElectron20AndUp
=
Number
.
parseInt
(
process
.
versions
.
modules
)
>=
108
;
}
const
defaultCxxStandard
=
isNode18OrElectron20AndUp
?
'17'
:
'14'
;
process
.
stdout
.
write
(
defaultCxxStandard
)
;
Back
|
FazBrowse Home
|
New Git URL