diff options
author | 2016-01-08 13:53:57 +0100 | |
---|---|---|
committer | 2016-01-08 13:53:57 +0100 | |
commit | b3a224378dd60eb23c0b21efe94bff6b51d92c08 (patch) | |
tree | 1b39096b251aa83d07a8b7d9470838b4b6a59f08 /scripts/src/osd/modules.lua | |
parent | 08c8c26b629290d4776002ca14ccc2c1907b58fd (diff) |
Fix compile on clang 3.7+ on linux (nw)
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r-- | scripts/src/osd/modules.lua | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 3fc89424e6d..ff052e4bef4 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -15,8 +15,8 @@ end function addlibfromstring(str) if (str==nil) then return end - for w in str:gmatch("%S+") do - if string.starts(w,"-l")==true then + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==true then links { string.sub(w,3) } @@ -26,8 +26,8 @@ end function addoptionsfromstring(str) if (str==nil) then return end - for w in str:gmatch("%S+") do - if string.starts(w,"-l")==false then + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==false then linkoptions { w } @@ -122,7 +122,7 @@ function osdmodulesbuild() if _OPTIONS["USE_QTDEBUG"]=="1" then defines { "USE_QTDEBUG=1", - } + } else defines { "USE_QTDEBUG=0", @@ -137,6 +137,15 @@ function qtdebuggerbuild() removeflags { "SingleOutputDir", } + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then + configuration { "gmake" } + if (version >= 30700) then + buildoptions { + "-Wno-inconsistent-missing-override", + } + end + end files { MAME_DIR .. "src/osd/modules/debugger/debugqt.cpp", @@ -175,7 +184,7 @@ function qtdebuggerbuild() defines { "USE_QTDEBUG=1", } - + local MOC = "" if (os.is("windows")) then MOC = "moc" @@ -185,9 +194,9 @@ function qtdebuggerbuild() if (QMAKETST=='') then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) - end + end MOC = _OPTIONS["QT_HOME"] .. "/bin/moc" - else + else MOCTST = backtick("which moc-qt5 2>/dev/null") if (MOCTST=='') then MOCTST = backtick("which moc 2>/dev/null") @@ -195,12 +204,12 @@ function qtdebuggerbuild() if (MOCTST=='') then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) - end + end MOC = MOCTST end end - - + + custombuildtask { { MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h", GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, { MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h", GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, @@ -211,9 +220,9 @@ function qtdebuggerbuild() { MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h", GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, { MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, { MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.cpp", { },{ MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, - + } - + if _OPTIONS["targetos"]=="windows" then configuration { "mingw*" } buildoptions { |