diff options
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/3rdparty.lua | 36 | ||||
-rw-r--r-- | scripts/src/benchmarks.lua | 74 | ||||
-rw-r--r-- | scripts/src/tests.lua | 98 |
3 files changed, 141 insertions, 67 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 2bee6477f01..66fba9f2144 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -917,39 +917,3 @@ links { "portaudio", } end - --------------------------------------------------- --- GoogleTest library objects --------------------------------------------------- - -project "gtest" - uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4" - kind "StaticLib" - - configuration { "gmake" } - buildoptions { - "-Wno-undef", - "-Wno-unused-variable", - } - - configuration { "mingw-clang" } - buildoptions { - "-O0", -- crash of compiler when doing optimization - } - - configuration { "vs*" } -if _OPTIONS["vs"]=="intel-15" then - buildoptions { - "/Qwd1195", -- error #1195: conversion from integer to smaller pointer - } -end - - configuration { } - - includedirs { - MAME_DIR .. "3rdparty/googletest/googletest/include", - MAME_DIR .. "3rdparty/googletest/googletest", - } - files { - MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc", - } diff --git a/scripts/src/benchmarks.lua b/scripts/src/benchmarks.lua new file mode 100644 index 00000000000..f774e3f45ca --- /dev/null +++ b/scripts/src/benchmarks.lua @@ -0,0 +1,74 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- benchmarks.lua +-- +-- Rules for building benchmarks +-- +--------------------------------------------------------------------------- + +-------------------------------------------------- +-- Google Benchmark library objects +-------------------------------------------------- + +project "benchmark" + uuid "60a7e05c-8b4f-497c-bfda-2949a009ba0d" + kind "StaticLib" + + configuration { } + defines { + "HAVE_STD_REGEX", + } + + includedirs { + MAME_DIR .. "3rdparty/benchmark/include", + } + files { + MAME_DIR .. "3rdparty/benchmark/src/benchmark.cc", + MAME_DIR .. "3rdparty/benchmark/src/colorprint.cc", + MAME_DIR .. "3rdparty/benchmark/src/commandlineflags.cc", + MAME_DIR .. "3rdparty/benchmark/src/console_reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/csv_reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/json_reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/log.cc", + MAME_DIR .. "3rdparty/benchmark/src/reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/sleep.cc", + MAME_DIR .. "3rdparty/benchmark/src/string_util.cc", + MAME_DIR .. "3rdparty/benchmark/src/sysinfo.cc", + MAME_DIR .. "3rdparty/benchmark/src/walltime.cc", + MAME_DIR .. "3rdparty/benchmark/src/re_std.cc", + } + + + +project("benchmarks") + uuid ("a9750a48-d283-4a6d-b126-31c7ce049af1") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables + } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + configuration { } + + links { + "benchmark", + } + + includedirs { + MAME_DIR .. "3rdparty/benchmark/include", + MAME_DIR .. "src/osd", + } + + files { + MAME_DIR .. "benchmarks/main.cpp", + MAME_DIR .. "benchmarks/eminline_native.cpp", + MAME_DIR .. "benchmarks/eminline_noasm.cpp", + } + diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua index 99d82fcb6cb..d30cff64df2 100644 --- a/scripts/src/tests.lua +++ b/scripts/src/tests.lua @@ -8,42 +8,78 @@ -- Rules for building tests -- --------------------------------------------------------------------------- +-------------------------------------------------- +-- GoogleTest library objects +-------------------------------------------------- -project("tests") -uuid ("66d4c639-196b-4065-a411-7ee9266564f5") -kind "ConsoleApp" +project "gtest" + uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4" + kind "StaticLib" + + configuration { "gmake" } + buildoptions { + "-Wno-undef", + "-Wno-unused-variable", + } -flags { - "Symbols", -- always include minimum symbols for executables -} + configuration { "mingw-clang" } + buildoptions { + "-O0", -- crash of compiler when doing optimization + } -if _OPTIONS["SEPARATE_BIN"]~="1" then - targetdir(MAME_DIR) + configuration { "vs*" } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd1195", -- error #1195: conversion from integer to smaller pointer + } end -configuration { "gmake" } - buildoptions { - "-Wno-undef", + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/googletest/googletest/include", + MAME_DIR .. "3rdparty/googletest/googletest", + } + files { + MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc", + } + + +project("tests") + uuid ("66d4c639-196b-4065-a411-7ee9266564f5") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables } -configuration { } - -links { - "gtest", - "utils", - "expat", - "zlib", - "ocore_" .. _OPTIONS["osd"], -} - -includedirs { - MAME_DIR .. "3rdparty/googletest/googletest/include", - MAME_DIR .. "src/osd", - MAME_DIR .. "src/lib/util", -} - -files { - MAME_DIR .. "tests/main.cpp", - MAME_DIR .. "tests/lib/util/corestr.cpp", -} + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + configuration { "gmake" } + buildoptions { + "-Wno-undef", + } + + configuration { } + + links { + "gtest", + "utils", + "expat", + "zlib", + "ocore_" .. _OPTIONS["osd"], + } + + includedirs { + MAME_DIR .. "3rdparty/googletest/googletest/include", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib/util", + } + + files { + MAME_DIR .. "tests/main.cpp", + MAME_DIR .. "tests/lib/util/corestr.cpp", + } |