Merge pull request #1752 from nickclark2016/issues/1751

Added C17/GNU17 support to gmake/gmake2 exporters
This commit is contained in:
Samuel Surtees 2021-11-07 16:19:02 +10:00 committed by GitHub
commit 76d9e24da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 ###