From 669cdbc6e606313efe1a38caba7cb10d3b2f23fe Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 26 Nov 2021 00:39:53 +0000 Subject: Compile generated/external code as release Moves stb stuff to .c then all .ll and .c built release mode, neatly disables all the warnings --- Jamroot.jam | 9 ++++++++- gfx/models/obj.ll | 5 ----- gfx/models/stb_image.c | 4 ++++ gfx/models/stb_image.cpp | 9 --------- lib/jsonParse.ll | 5 ----- 5 files changed, 12 insertions(+), 20 deletions(-) create mode 100644 gfx/models/stb_image.c delete mode 100644 gfx/models/stb_image.cpp diff --git a/Jamroot.jam b/Jamroot.jam index fdd08cd..62032d9 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -70,7 +70,14 @@ run application/main.cpp ; lib ilt : - [ glob-tree *.cpp *.c *.vs *.fs *.ll : bin test ] + [ glob-tree *.cpp *.vs *.fs : bin test ] + [ lib generated : [ glob-tree *.ll *.c ] : + . + lib + release + static + -fPIC + ] : . lib diff --git a/gfx/models/obj.ll b/gfx/models/obj.ll index a9a857b..84884fe 100644 --- a/gfx/models/obj.ll +++ b/gfx/models/obj.ll @@ -7,11 +7,6 @@ %option prefix="objbase" %{ -#pragma GCC diagnostic ignored "-Wsign-compare" -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" -#if __clang__ -#pragma GCC diagnostic ignored "-Wnull-conversion" -#endif #include #include #include diff --git a/gfx/models/stb_image.c b/gfx/models/stb_image.c new file mode 100644 index 0000000..c15369e --- /dev/null +++ b/gfx/models/stb_image.c @@ -0,0 +1,4 @@ +#ifndef TIDY +# define STB_IMAGE_IMPLEMENTATION +# include "stb/stb_image.h" +#endif diff --git a/gfx/models/stb_image.cpp b/gfx/models/stb_image.cpp deleted file mode 100644 index c6b605e..0000000 --- a/gfx/models/stb_image.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef TIDY -# define STB_IMAGE_IMPLEMENTATION -# pragma GCC diagnostic ignored "-Wsign-compare" -# pragma GCC diagnostic ignored "-Wimplicit-fallthrough" -# ifndef __clang__ -# pragma GCC diagnostic ignored "-Wunused-but-set-variable" -# endif -# include "stb/stb_image.h" -#endif diff --git a/lib/jsonParse.ll b/lib/jsonParse.ll index ab09e80..c646044 100644 --- a/lib/jsonParse.ll +++ b/lib/jsonParse.ll @@ -12,11 +12,6 @@ #include class jsonBaseFlexLexer; #include "jsonParse.h" -#pragma GCC diagnostic ignored "-Wsign-compare" -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wnull-conversion" -#endif %} beginobj "{" -- cgit v1.2.3