Prefer .std() for declaring the C++ version

pull/561/head
Wilfred Hughes 2023-08-23 00:00:29 +07:00
parent 35bc02c599
commit c6008c2638
1 changed files with 1 additions and 6 deletions

@ -41,6 +41,7 @@ impl TreeSitterParser {
cpp_build
.include(&dir)
.cpp(true)
.std("c++14")
.flag_if_supported("-Wno-implicit-fallthrough")
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-ignored-qualifiers")
@ -54,12 +55,6 @@ impl TreeSitterParser {
// should be removed after fixed.
.flag_if_supported("-Wno-return-type");
if cfg!(windows) {
cpp_build.flag("/std:c++14");
} else {
cpp_build.flag("--std=c++14");
}
for file in cpp_files {
cpp_build.file(dir.join(file));
}