mirror of
https://github.com/holub/mame
synced 2025-04-19 07:00:31 +03:00
Added addprojectflags function and added -Wsuggest-override for all that are not 3rdparty projects.
It is place where all additional checks we should put
This commit is contained in:
parent
3afd02d896
commit
6a765a95ec
@ -53,6 +53,15 @@ function layoutbuildtask(_folder, _name)
|
||||
{ MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting src/".._folder.."/".._name..".lay...", PYTHON .. " $(1) $(<) $(@) layout_".._name }};
|
||||
end
|
||||
|
||||
function addprojectflags()
|
||||
local version = str_to_version(_OPTIONS["gcc_version"])
|
||||
if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "gcc") and (version >= 50100) then
|
||||
buildoptions_cpp {
|
||||
"-Wsuggest-override",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
CPUS = {}
|
||||
SOUNDS = {}
|
||||
MACHINES = {}
|
||||
|
@ -23,6 +23,8 @@ function devicesProject(_target, _subtarget)
|
||||
"ArchiveSplit",
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
@ -59,6 +61,7 @@ if (_OPTIONS["SOURCES"] == nil) then
|
||||
uuid ("5d782c89-cf7e-4cfe-8f9f-0d4bfc16c91d")
|
||||
kind (LIBTYPE)
|
||||
targetsubdir(_target .."_" .. _subtarget)
|
||||
addprojectflags()
|
||||
options {
|
||||
"ArchiveSplit",
|
||||
}
|
||||
@ -96,6 +99,7 @@ if #disasm_files > 0 then
|
||||
uuid ("f2d28b0a-6da5-4f78-b629-d834aa00429d")
|
||||
kind (LIBTYPE)
|
||||
targetsubdir(_target .."_" .. _subtarget)
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
|
@ -14,6 +14,8 @@ targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
|
||||
uuid ("e6fa15e4-a354-4526-acef-13c8e80fcacf")
|
||||
kind (LIBTYPE)
|
||||
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
|
@ -13,6 +13,8 @@ project "utils"
|
||||
uuid "22489ad0-4cb2-4d91-ad81-24b0d80ca30a"
|
||||
kind (LIBTYPE)
|
||||
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
@ -105,6 +107,8 @@ project "formats"
|
||||
uuid "f69636b1-fcce-45ce-b09a-113e371a2d7a"
|
||||
kind (LIBTYPE)
|
||||
|
||||
addprojectflags()
|
||||
|
||||
options {
|
||||
"ArchiveSplit",
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ end
|
||||
uuid (os.uuid(_target .."_" .. _subtarget))
|
||||
kind "ConsoleApp"
|
||||
|
||||
addprojectflags()
|
||||
flags {
|
||||
"NoManifest",
|
||||
"Symbols", -- always include minimum symbols for executables
|
||||
|
@ -13,6 +13,8 @@ project "netlist"
|
||||
uuid "665ef8ac-2a4c-4c3e-a05f-fd1e5db11de9"
|
||||
kind (LIBTYPE)
|
||||
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/lib/netlist",
|
||||
MAME_DIR .. "src/osd",
|
||||
|
@ -21,6 +21,8 @@ project ("osd_" .. _OPTIONS["osd"])
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("osdmini_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
@ -68,6 +70,8 @@ project ("ocore_" .. _OPTIONS["osd"])
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("osdmini_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
|
@ -313,6 +313,8 @@ project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
kind (LIBTYPE)
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("sdl_cfg.lua")
|
||||
osdmodulesbuild()
|
||||
|
||||
@ -416,6 +418,8 @@ project ("ocore_" .. _OPTIONS["osd"])
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("sdl_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
@ -475,6 +479,8 @@ if _OPTIONS["with-tools"] then
|
||||
flags {
|
||||
"Symbols", -- always include minimum symbols for executables
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("sdl_cfg.lua")
|
||||
|
||||
@ -537,6 +543,8 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
|
||||
"Symbols", -- always include minimum symbols for executables
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("sdl_cfg.lua")
|
||||
|
||||
if _OPTIONS["SEPARATE_BIN"]~="1" then
|
||||
|
@ -107,6 +107,8 @@ project ("osd_" .. _OPTIONS["osd"])
|
||||
dofile("windows_cfg.lua")
|
||||
osdmodulesbuild()
|
||||
|
||||
addprojectflags()
|
||||
|
||||
defines {
|
||||
"DIRECT3D_VERSION=0x0900",
|
||||
}
|
||||
@ -197,6 +199,8 @@ project ("ocore_" .. _OPTIONS["osd"])
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
addprojectflags()
|
||||
|
||||
dofile("windows_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
@ -264,6 +268,8 @@ if _OPTIONS["with-tools"] then
|
||||
uuid ("061293ca-7290-44ac-b2b5-5913ae8dc9c0")
|
||||
kind "ConsoleApp"
|
||||
|
||||
addprojectflags()
|
||||
|
||||
flags {
|
||||
"Symbols", -- always include minimum symbols for executables
|
||||
}
|
||||
|
@ -765,6 +765,7 @@ function createMAMEProjects(_target, _subtarget, _name)
|
||||
targetsubdir(_target .."_" .. _subtarget)
|
||||
kind (LIBTYPE)
|
||||
uuid (os.uuid("drv-" .. _target .."_" .. _subtarget .. "_" .._name))
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
|
@ -17,6 +17,7 @@ function createProjects_mame_dummy(_target, _subtarget)
|
||||
targetsubdir(_target .."_" .. _subtarget)
|
||||
kind (LIBTYPE)
|
||||
uuid (os.uuid("drv-mame_dummy"))
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
|
@ -882,6 +882,7 @@ function createMESSProjects(_target, _subtarget, _name)
|
||||
targetsubdir(_target .."_" .. _subtarget)
|
||||
kind (LIBTYPE)
|
||||
uuid (os.uuid("drv-" .. _target .."_" .. _subtarget .. "_" .._name))
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
|
@ -80,6 +80,7 @@ function createProjects_mame_tiny(_target, _subtarget)
|
||||
targetsubdir(_target .."_" .. _subtarget)
|
||||
kind (LIBTYPE)
|
||||
uuid (os.uuid("drv-mame-tiny"))
|
||||
addprojectflags()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
|
Loading…
Reference in New Issue
Block a user