Added C17/GNU17 support to gmake/gmake2 exporters

This commit is contained in:
Nicholaus Clark 2021-11-07 01:10:58 -05:00
parent 5e6b5467db
commit f73ef9337e
4 changed files with 18 additions and 0 deletions

View File

@ -762,6 +762,7 @@
"gnu90",
"gnu99",
"gnu11",
"gnu17"
}
}

View File

@ -136,10 +136,12 @@
["C90"] = "-std=c90",
["C99"] = "-std=c99",
["C11"] = "-std=c11",
["C17"] = "-std=c17",
["gnu89"] = "-std=gnu89",
["gnu90"] = "-std=gnu90",
["gnu99"] = "-std=gnu99",
["gnu11"] = "-std=gnu11",
["gnu17"] = "-std=gnu17"
}
}

View File

@ -807,6 +807,13 @@
test.contains({ }, gcc.getcxxflags(cfg))
end
function suite.cflags_onC17()
cdialect "C17"
prepare()
test.contains({ "-std=c17" }, gcc.getcflags(cfg))
test.contains({ }, gcc.getcxxflags(cfg))
end
function suite.cflags_ongnu89()
cdialect "gnu89"
prepare()
@ -835,6 +842,13 @@
test.contains({ }, gcc.getcxxflags(cfg))
end
function suite.cflags_ongnu17()
cdialect "gnu17"
prepare()
test.contains({ "-std=gnu17" }, gcc.getcflags(cfg))
test.contains({ }, gcc.getcxxflags(cfg))
end
function suite.cxxflags_onCppDefault()
cppdialect "Default"
prepare()

View File

@ -18,6 +18,7 @@ cdialect "value"
* `gnu90`: GNU dialect of ISO C90
* `gnu99`: GNU dialect of ISO C99
* `gnu11`: GNU dialect of ISO C11
* `gnu17`: GNU dialect of ISO C17
### Applies To ###