Get rid of gflags alltogether

This commit is contained in:
Jonathan Goyvaerts 2019-04-18 00:08:59 +02:00
parent 67cc8b7316
commit 81fe22f1c8
30 changed files with 2 additions and 164 deletions

3
.gitmodules vendored
View File

@ -16,9 +16,6 @@
[submodule "third_party/catch"]
path = third_party/catch
url = https://github.com/catchorg/Catch2.git
[submodule "third_party/gflags"]
path = third_party/gflags
url = https://github.com/benvanik/gflags.git
[submodule "third_party/premake-core"]
path = third_party/premake-core
url = https://github.com/xenia-project/premake-core.git

View File

@ -192,30 +192,9 @@ filter("platforms:Windows")
"shlwapi",
})
-- Create scratch/ path and dummy flags file if needed.
-- Create scratch/ path
if not os.isdir("scratch") then
os.mkdir("scratch")
local flags_file = io.open("scratch/flags.txt", "w")
flags_file:write("# Put flags, one on each line.\n")
flags_file:write("# Launch executables with --flags_file=scratch/flags.txt\n")
flags_file:write("\n")
flags_file:write("--cpu=x64\n")
flags_file:write("#--enable_haswell_instructions=false\n")
flags_file:write("\n")
flags_file:write("--debug\n")
flags_file:write("#--protect_zero=false\n")
flags_file:write("\n")
flags_file:write("#--mute\n")
flags_file:write("\n")
flags_file:write("--fast_stdout\n")
flags_file:write("#--flush_stdout=false\n")
flags_file:write("\n")
flags_file:write("#--vsync=false\n")
flags_file:write("#--trace_gpu_prefix=scratch/gpu/gpu_trace_\n")
flags_file:write("#--trace_gpu_stream\n")
flags_file:write("#--disable_framebuffer_readback\n")
flags_file:write("\n")
flags_file:close()
end
solution("xenia")
@ -229,12 +208,10 @@ solution("xenia")
end
configurations({"Checked", "Debug", "Release"})
-- Include third party files first so they don't have to deal with gflags.
include("third_party/aes_128.lua")
include("third_party/capstone.lua")
include("third_party/discord-rpc.lua")
include("third_party/cxxopts.lua")
include("third_party/gflags.lua")
include("third_party/cpptoml.lua")
include("third_party/glew.lua")
include("third_party/glslang-spirv.lua")

View File

@ -11,7 +11,6 @@ project("xenia-app")
"aes_128",
"capstone",
"discord-rpc",
"gflags",
"glew",
"glslang-spirv",
"imgui",
@ -45,9 +44,6 @@ project("xenia-app")
"XBYAK_NO_OP_NAMES",
"XBYAK_ENABLE_OMITTED_OPERAND",
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()
files({
"xenia_main.cc",
@ -89,6 +85,5 @@ project("xenia-app")
if not os.isfile(user_file) then
debugdir(project_root)
debugargs({
"--flagfile=scratch/flags.txt",
})
end

View File

@ -12,7 +12,4 @@ project("xenia-apu-nop")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -14,7 +14,6 @@ project("xenia-apu")
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
project_root.."/third_party/libav/",
})
local_platform_files()

View File

@ -12,7 +12,4 @@ project("xenia-apu-xaudio2")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -89,7 +89,6 @@ int Main() {
auto entry_info = xe::GetEntryInfo();
// Convert command line to an argv-like format so we can share code/use
// gflags.
auto command_line = GetCommandLineW();
int argc;
wchar_t** argv = CommandLineToArgvW(command_line, &argc);
@ -97,7 +96,7 @@ int Main() {
return 1;
}
// Convert all args to narrow, as gflags doesn't support wchar.
// Convert all args to narrow, as cxxopts doesn't support wchar.
int argca = argc;
char** argva = reinterpret_cast<char**>(alloca(sizeof(char*) * argca));
for (int n = 0; n < argca; n++) {

View File

@ -7,9 +7,6 @@ project("xenia-base")
language("C++")
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()
removefiles({"main_*.cc"})
files({

View File

@ -2,9 +2,6 @@ project_root = "../../../.."
include(project_root.."/tools/build")
test_suite("xenia-base-tests", project_root, ".", {
includedirs = {
project_root.."/third_party/gflags/src",
},
links = {
"xenia-base",
},

View File

@ -27,6 +27,5 @@ project("xenia-cpu-backend-x64")
includedirs({
project_root.."/third_party/capstone/include",
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -11,7 +11,6 @@ project("xenia-cpu-ppc-tests")
"xenia-cpu-backend-x64",
"xenia-cpu",
"xenia-base",
"gflags",
"capstone", -- cpu-backend-x64
"mspack",
})
@ -22,15 +21,11 @@ project("xenia-cpu-ppc-tests")
files({
"*.s",
})
includedirs({
project_root.."/third_party/gflags/src",
})
filter("files:*.s")
flags({"ExcludeFromBuild"})
filter("platforms:Windows")
debugdir(project_root)
debugargs({
"--flagfile=scratch/flags.txt",
"2>&1",
"1>scratch/stdout-testing.txt",
})
@ -46,7 +41,6 @@ project("xenia-cpu-ppc-nativetests")
language("C++")
links({
"xenia-base",
"gflags",
})
files({
"ppc_testing_native_main.cc",
@ -59,9 +53,6 @@ project("xenia-cpu-ppc-nativetests")
filter("files:instr_*.s", "files:seq_*.s")
flags({"ExcludeFromBuild"})
filter({})
includedirs({
project_root.."/third_party/gflags/src",
})
buildoptions({
"-Wa,-mregnames", -- Tell GAS to accept register names.
})

View File

@ -12,7 +12,6 @@ project("xenia-cpu")
})
includedirs({
project_root.."/third_party/llvm/include",
project_root.."/third_party/gflags/src",
})
local_platform_files()
local_platform_files("backend")

View File

@ -2,9 +2,6 @@ project_root = "../../../.."
include(project_root.."/tools/build")
test_suite("xenia-cpu-tests", project_root, ".", {
includedirs = {
project_root.."/third_party/gflags/src",
},
links = {
"capstone",
"xenia-base",

View File

@ -16,7 +16,6 @@ project("xenia-debug-ui")
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
project_root.."/third_party/yaml-cpp/include/",
})
local_platform_files()

View File

@ -15,7 +15,4 @@ project("xenia-gpu-null")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -19,7 +19,6 @@ project("xenia-gpu")
})
includedirs({
project_root.."/third_party/spirv-tools/external/include",
project_root.."/third_party/gflags/src",
})
local_platform_files()
-- local_platform_files("spirv")
@ -31,7 +30,6 @@ project("xenia-gpu-shader-compiler")
kind("ConsoleApp")
language("C++")
links({
"gflags",
"glslang-spirv",
"spirv-tools",
"xenia-base",
@ -40,9 +38,6 @@ project("xenia-gpu-shader-compiler")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
files({
"shader_compiler_main.cc",
"../base/main_"..platform_suffix..".cc",
@ -54,7 +49,6 @@ project("xenia-gpu-shader-compiler")
if not os.isfile(user_file) then
debugdir(project_root)
debugargs({
"--flagfile=scratch/flags.txt",
"2>&1",
"1>scratch/stdout-shader-compiler.txt",
})

View File

@ -17,9 +17,6 @@ project("xenia-gpu-vulkan")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()
files({
"shaders/bin/*.h",
@ -34,7 +31,6 @@ project("xenia-gpu-vulkan-trace-viewer")
links({
"aes_128",
"capstone",
"gflags",
"glslang-spirv",
"imgui",
"libavcodec",
@ -62,9 +58,6 @@ project("xenia-gpu-vulkan-trace-viewer")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
files({
"vulkan_trace_viewer_main.cc",
"../../base/main_"..platform_suffix..".cc",
@ -91,7 +84,6 @@ project("xenia-gpu-vulkan-trace-viewer")
if not os.isfile(user_file) then
debugdir(project_root)
debugargs({
"--flagfile=scratch/flags.txt",
"2>&1",
"1>scratch/stdout-trace-viewer.txt",
})
@ -105,7 +97,6 @@ project("xenia-gpu-vulkan-trace-dump")
links({
"aes_128",
"capstone",
"gflags",
"glslang-spirv",
"imgui",
"libavcodec",
@ -133,9 +124,6 @@ project("xenia-gpu-vulkan-trace-dump")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
files({
"vulkan_trace_dump_main.cc",
"../../base/main_"..platform_suffix..".cc",
@ -156,7 +144,6 @@ project("xenia-gpu-vulkan-trace-dump")
if not os.isfile(user_file) then
debugdir(project_root)
debugargs({
"--flagfile=scratch/flags.txt",
"2>&1",
"1>scratch/stdout-trace-dump.txt",
})

View File

@ -12,7 +12,4 @@ project("xenia-hid-nop")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -11,9 +11,6 @@ project("xenia-hid")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()
removefiles({"*_demo.cc"})
@ -23,7 +20,6 @@ project("xenia-hid-demo")
kind("WindowedApp")
language("C++")
links({
"gflags",
"glew",
"imgui",
"volk",
@ -37,9 +33,6 @@ project("xenia-hid-demo")
"GLEW_STATIC=1",
"GLEW_MX=1",
})
includedirs({
project_root.."/third_party/gflags/src",
})
files({
"hid_demo.cc",
"../base/main_"..platform_suffix..".cc",

View File

@ -13,7 +13,4 @@ project("xenia-hid-winkey")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -12,7 +12,4 @@ project("xenia-hid-xinput")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()

View File

@ -16,9 +16,6 @@ project("xenia-kernel")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
recursive_platform_files()
files({
"debug_visualizers.natvis",

View File

@ -11,7 +11,4 @@ project("xenia-core")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
files({"*.h", "*.cc"})

View File

@ -11,8 +11,5 @@ project("xenia-ui")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
local_platform_files()
removefiles({"*_demo.cc"})

View File

@ -14,7 +14,6 @@ project("xenia-ui-spirv")
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
project_root.."/third_party/spirv-tools/external/include",
})
local_platform_files()

View File

@ -14,7 +14,6 @@ project("xenia-ui-vulkan")
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
project_root.."/third_party/vulkan/",
})
local_platform_files()
@ -29,7 +28,6 @@ project("xenia-ui-window-vulkan-demo")
kind("WindowedApp")
language("C++")
links({
"gflags",
"imgui",
"volk",
"xenia-base",
@ -40,7 +38,6 @@ project("xenia-ui-window-vulkan-demo")
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
project_root.."/third_party/vulkan/",
})
files({

View File

@ -11,9 +11,6 @@ project("xenia-vfs")
})
defines({
})
includedirs({
project_root.."/third_party/gflags/src",
})
recursive_platform_files()
removefiles({"vfs_dump.cc"})
@ -22,14 +19,10 @@ project("xenia-vfs-dump")
kind("ConsoleApp")
language("C++")
links({
"gflags",
"xenia-base",
"xenia-vfs",
})
defines({})
includedirs({
project_root.."/third_party/gflags/src",
})
files({
"vfs_dump.cc",

1
third_party/gflags vendored

@ -1 +0,0 @@
Subproject commit 78b15171a7fce5815df58a919ab593ce80222028

View File

@ -1,41 +0,0 @@
group("third_party")
project("gflags")
uuid("e319da87-75ed-4517-8f65-bd25e9cc02a3")
kind("StaticLib")
language("C++")
-- These win32-specific overrides must come before others.
filter("platforms:Windows")
defines({
"PATH_SEPARATOR=%%27\\\\%%27",
})
includedirs({
"gflags/src/windows",
})
filter({})
defines({
"GFLAGS_DLL_DECL=",
"GFLAGS_DLL_DEFINE_FLAG=",
"GFLAGS_DLL_DECLARE_FLAG=",
"_LIB",
})
includedirs({
"gflags/src",
})
files({
"gflags/src/gflags.cc",
"gflags/src/gflags_completions.cc",
"gflags/src/gflags_reporting.cc",
"gflags/src/mutex.h",
"gflags/src/util.h",
})
filter("platforms:Windows")
files({
"gflags/src/windows/config.h",
"gflags/src/windows/gflags/gflags.h",
"gflags/src/windows/gflags/gflags_completions.h",
"gflags/src/windows/gflags/gflags_declare.h",
"gflags/src/windows/port.cc",
"gflags/src/windows/port.h",
})

View File

@ -25,7 +25,6 @@ local function combined_test_suite(test_suite_name, project_root, base_path, con
project_root.."/"..build_bin,
}))
links(merge_arrays(config["links"], {
"gflags",
}))
files({
project_root.."/"..build_tools_src.."/test_suite_main.cc",
@ -50,7 +49,6 @@ local function split_test_suite(test_suite_name, project_root, base_path, config
project_root.."/"..build_bin,
}))
links(merge_arrays(config["links"], {
"gflags",
}))
files({
project_root.."/"..build_tools_src.."/test_suite_main.cc",