From 6a8a862a16a32150573d52ed3fd6aee558ccc8c9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 19 Mar 2015 05:31:02 +0100 Subject: [PATCH] Separate C and C++ flags to prevent warnings while building bgfx --- scripts/toolchain.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 0681bdb..85f24e1 100755 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -414,7 +414,6 @@ function toolchain(_buildDir, _libDir) defines { "WIN32" } includedirs { path.join(bxDir, "include/compat/mingw") } buildoptions { - "-std=c++0x", "-Wunused-value", "-fdata-sections", "-ffunction-sections", @@ -422,6 +421,9 @@ function toolchain(_buildDir, _libDir) "-Wunused-value", "-Wundef", } + buildoptions_cpp { + "-std=c++0x", + } linkoptions { "-Wl,--gc-sections", "-static-libgcc", @@ -486,11 +488,13 @@ function toolchain(_buildDir, _libDir) configuration { "linux-*" } buildoptions { - "-std=c++0x", "-msse2", "-Wunused-value", "-Wundef", } + buildoptions_cpp { + "-std=c++0x", + } links { "rt", "dl", @@ -845,10 +849,12 @@ function toolchain(_buildDir, _libDir) "__STDC_VERSION__=199901L", } buildoptions { - "-std=c++0x", "-Wunused-value", "-Wundef", } + buildoptions_cpp { + "-std=c++0x", + } includedirs { "/opt/vc/include", "/opt/vc/include/interface/vcos/pthreads",