Skip to content

Commit 7f1b9ba

Browse files
committed
Merge branch 'disablewarnings'
2 parents 7ce62f4 + 0549711 commit 7f1b9ba

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

projects/disablewarnings/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## disablewarnings
2+
3+
Test [`disablewarnings`](https://premake.github.io/docs/disablewarnings)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
if (_ACTION == nil) then
2+
return
3+
end
4+
5+
local LocationDir = "solution/%{_ACTION}"
6+
7+
workspace "Project"
8+
location(LocationDir)
9+
configurations {"Debug", "Release"}
10+
11+
objdir(path.join(LocationDir, "obj")) -- premake adds $(configName)/$(AppName)
12+
targetdir(path.join(LocationDir, "bin/%{cfg.buildcfg}"))
13+
startproject "app"
14+
15+
project "app"
16+
kind "ConsoleApp"
17+
targetname "app"
18+
19+
files { "src/main.cpp" }
20+
21+
fatalwarnings "All"
22+
23+
filter "toolset:msc*"
24+
disablewarnings {
25+
"4035", -- '%function': no return value
26+
"4716", -- '%function': must return a value
27+
}
28+
filter "toolset:not msc*"
29+
disablewarnings {
30+
"return-type"
31+
}
32+
filter {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
int foo() {} // missing return
2+
3+
int main()
4+
{
5+
}

projects/disablewarnings/unsupported_by_vs2019--cc=clang

Whitespace-only changes.

projects/disablewarnings/unsupported_by_vs2022--cc=clang

Whitespace-only changes.

0 commit comments

Comments
 (0)