feat: Update CMake configuration for Abseil and gRPC, enhance modular build support, and add CLI flag handling
This commit is contained in:
@@ -134,7 +134,7 @@ if(YAZE_PLATFORM_MACOS)
|
|||||||
set(_yaze_default_force_absl ON)
|
set(_yaze_default_force_absl ON)
|
||||||
endif()
|
endif()
|
||||||
option(YAZE_FORCE_BUNDLED_ABSL
|
option(YAZE_FORCE_BUNDLED_ABSL
|
||||||
"Force building the bundled Abseil submodule instead of finding a system package"
|
"Force building the bundled Abseil FetchContent dependency instead of finding a system package"
|
||||||
${_yaze_default_force_absl})
|
${_yaze_default_force_absl})
|
||||||
|
|
||||||
# Create a common interface target for shared settings
|
# Create a common interface target for shared settings
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
"name": "macos-dev-z3ed-ai",
|
"name": "macos-dev-z3ed-ai",
|
||||||
"displayName": "macOS debug z3ed agent (ARM64)",
|
"displayName": "macOS debug z3ed agent (ARM64)",
|
||||||
"description": "macOS ARM64 development build with ROM testing",
|
"description": "macOS ARM64 development build with ROM testing",
|
||||||
|
"binaryDir": "${sourceDir}/build_test",
|
||||||
"inherits": "macos-debug",
|
"inherits": "macos-debug",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"YAZE_ENABLE_ROM_TESTS": "ON",
|
"YAZE_ENABLE_ROM_TESTS": "ON",
|
||||||
@@ -365,7 +366,12 @@
|
|||||||
{
|
{
|
||||||
"name": "macos-dev",
|
"name": "macos-dev",
|
||||||
"configurePreset": "macos-dev",
|
"configurePreset": "macos-dev",
|
||||||
"displayName": "macOS Development Build (ARM64)"
|
"displayName": "macOS debug ARM64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-dev-z3ed-ai",
|
||||||
|
"configurePreset": "macos-dev-z3ed-ai",
|
||||||
|
"displayName": "macOS debug arm64 z3ed-ai"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci",
|
"name": "ci",
|
||||||
|
|||||||
@@ -1,34 +1,45 @@
|
|||||||
# Normalize Abseil's hardware AES flags when targeting macOS ARM64 only.
|
# Abseil release to use when fetching from source
|
||||||
if(APPLE AND DEFINED CMAKE_OSX_ARCHITECTURES AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
set(YAZE_ABSL_GIT_TAG "20240116.2" CACHE STRING "Abseil release tag used when fetching from source")
|
||||||
set(ABSL_RANDOM_HWAES_X64_FLAGS "" CACHE STRING "" FORCE)
|
|
||||||
set(ABSL_RANDOM_HWAES_ARM64_FLAGS "-march=armv8-a+crypto" CACHE STRING "" FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (MINGW OR WIN32 OR YAZE_FORCE_BUNDLED_ABSL)
|
# Attempt to use the system package unless the build explicitly requests the
|
||||||
add_subdirectory(src/lib/abseil-cpp)
|
# bundled (fetched) copy or we're on platforms where prebuilt packages are often
|
||||||
elseif(YAZE_MINIMAL_BUILD)
|
# missing the required components (e.g. macOS).
|
||||||
# For CI builds, always use submodule to avoid dependency issues
|
set(_yaze_use_fetched_absl ${YAZE_FORCE_BUNDLED_ABSL})
|
||||||
add_subdirectory(src/lib/abseil-cpp)
|
if(NOT _yaze_use_fetched_absl)
|
||||||
else()
|
find_package(absl QUIET CONFIG)
|
||||||
# Try system package first, fallback to submodule
|
if(absl_FOUND)
|
||||||
find_package(absl QUIET)
|
message(STATUS "Using system-provided Abseil package")
|
||||||
if(NOT absl_FOUND)
|
else()
|
||||||
message(STATUS "System Abseil not found, using submodule")
|
set(_yaze_use_fetched_absl TRUE)
|
||||||
add_subdirectory(src/lib/abseil-cpp)
|
message(STATUS "System Abseil not found. Fetching release ${YAZE_ABSL_GIT_TAG}.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(ABSL_PROPAGATE_CXX_STD ON)
|
|
||||||
set(ABSL_CXX_STANDARD 23)
|
|
||||||
set(ABSL_USE_GOOGLETEST_HEAD ON)
|
|
||||||
set(ABSL_ENABLE_INSTALL ON)
|
|
||||||
|
|
||||||
# Silence C++23 deprecation warnings for Abseil int128
|
if(_yaze_use_fetched_absl)
|
||||||
if(MSVC)
|
include(FetchContent)
|
||||||
add_definitions(-DSILENCE_CXX23_DEPRECATIONS)
|
FetchContent_GetProperties(absl)
|
||||||
else()
|
if(NOT absl_POPULATED)
|
||||||
add_definitions(-D_SILENCE_CXX23_DEPRECATION_WARNING)
|
FetchContent_Declare(
|
||||||
|
absl
|
||||||
|
GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
|
||||||
|
GIT_TAG ${YAZE_ABSL_GIT_TAG}
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
GIT_PROGRESS TRUE
|
||||||
|
USES_TERMINAL_DOWNLOAD TRUE
|
||||||
|
)
|
||||||
|
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
|
||||||
|
set(ABSL_BUILD_TESTING OFF CACHE BOOL "" FORCE)
|
||||||
|
set(ABSL_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_MakeAvailable(absl)
|
||||||
|
message(STATUS "Fetched Abseil ${YAZE_ABSL_GIT_TAG}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# Define base Abseil targets
|
|
||||||
|
if(NOT TARGET absl::strings)
|
||||||
|
message(FATAL_ERROR "Abseil was not found or failed to configure correctly.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Canonical list of Abseil targets that the rest of the project links against.
|
||||||
set(
|
set(
|
||||||
ABSL_TARGETS
|
ABSL_TARGETS
|
||||||
absl::strings
|
absl::strings
|
||||||
@@ -61,20 +72,20 @@ set(
|
|||||||
absl::utility
|
absl::utility
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add int128 only on non-Windows platforms to avoid C++23 deprecation issues
|
# Only expose absl::int128 when it's supported without warnings.
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
list(APPEND ABSL_TARGETS absl::int128)
|
list(APPEND ABSL_TARGETS absl::int128)
|
||||||
message(STATUS "Including absl::int128 (non-Windows platform)")
|
message(STATUS "Including absl::int128 target")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Excluding absl::int128 on Windows to avoid C++23 deprecation issues")
|
message(STATUS "Skipping absl::int128 target on Windows")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE AND DEFINED CMAKE_OSX_ARCHITECTURES AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
if(APPLE AND DEFINED CMAKE_OSX_ARCHITECTURES AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
||||||
foreach(_absl_target IN ITEMS absl_random_internal_randen_hwaes absl_random_internal_randen_hwaes_impl)
|
foreach(_absl_target IN ITEMS absl_random_internal_randen_hwaes absl_random_internal_randen_hwaes_impl)
|
||||||
if(TARGET ${_absl_target})
|
if(TARGET ${_absl_target})
|
||||||
get_target_property(_absl_opts ${_absl_target} COMPILE_OPTIONS)
|
get_target_property(_absl_opts ${_absl_target} COMPILE_OPTIONS)
|
||||||
if(NOT _absl_opts STREQUAL "NOTFOUND")
|
if(_absl_opts AND NOT _absl_opts STREQUAL "NOTFOUND")
|
||||||
set(_absl_filtered_opts "")
|
set(_absl_filtered_opts)
|
||||||
set(_absl_skip_next FALSE)
|
set(_absl_skip_next FALSE)
|
||||||
foreach(_absl_opt IN LISTS _absl_opts)
|
foreach(_absl_opt IN LISTS _absl_opts)
|
||||||
if(_absl_skip_next)
|
if(_absl_skip_next)
|
||||||
@@ -88,11 +99,17 @@ if(APPLE AND DEFINED CMAKE_OSX_ARCHITECTURES AND CMAKE_OSX_ARCHITECTURES STREQUA
|
|||||||
if(_absl_opt STREQUAL "-maes" OR _absl_opt STREQUAL "-msse4.1")
|
if(_absl_opt STREQUAL "-maes" OR _absl_opt STREQUAL "-msse4.1")
|
||||||
continue()
|
continue()
|
||||||
endif()
|
endif()
|
||||||
list(APPEND _absl_filtered_opts "${_absl_opt}")
|
list(APPEND _absl_filtered_opts ${_absl_opt})
|
||||||
endforeach()
|
endforeach()
|
||||||
set_target_properties(${_absl_target} PROPERTIES COMPILE_OPTIONS "${_absl_filtered_opts}")
|
set_property(TARGET ${_absl_target} PROPERTY COMPILE_OPTIONS ${_absl_filtered_opts})
|
||||||
endif()
|
endif()
|
||||||
target_compile_options(${_absl_target} PRIVATE "-Xarch_arm64" "-march=armv8-a+crypto")
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Silence C++23 deprecation warnings for Abseil int128
|
||||||
|
if(MSVC)
|
||||||
|
add_definitions(-DSILENCE_CXX23_DEPRECATIONS)
|
||||||
|
else()
|
||||||
|
add_definitions(-D_SILENCE_CXX23_DEPRECATION_WARNING)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH FALSE)
|
|||||||
# Add compiler flags for Clang 15+ compatibility
|
# Add compiler flags for Clang 15+ compatibility
|
||||||
# gRPC v1.62.0 requires C++17 (std::result_of removed in C++20)
|
# gRPC v1.62.0 requires C++17 (std::result_of removed in C++20)
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
add_compile_options(-Wno-error=missing-template-arg-list-after-template-kw)
|
add_compile_options(-Wno-error=missing-template-arg-list-after-template-kw)
|
||||||
|
add_compile_definitions(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Save YAZE's C++ standard and temporarily set to C++17 for gRPC
|
# Save YAZE's C++ standard and temporarily set to C++17 for gRPC
|
||||||
@@ -46,6 +47,12 @@ set(gRPC_BUILD_GRPC_RUBY_PLUGIN OFF CACHE BOOL "" FORCE)
|
|||||||
set(gRPC_BENCHMARK_PROVIDER "none" CACHE STRING "" FORCE)
|
set(gRPC_BENCHMARK_PROVIDER "none" CACHE STRING "" FORCE)
|
||||||
set(gRPC_ZLIB_PROVIDER "package" CACHE STRING "" FORCE)
|
set(gRPC_ZLIB_PROVIDER "package" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
# Skip install rule generation inside gRPC's dependency graph. This avoids
|
||||||
|
# configure-time checks that require every transitive dependency (like Abseil
|
||||||
|
# compatibility shims) to participate in install export sets, which we do not
|
||||||
|
# need for the editor builds.
|
||||||
|
set(CMAKE_SKIP_INSTALL_RULES ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# Let gRPC fetch and build its own protobuf and abseil
|
# Let gRPC fetch and build its own protobuf and abseil
|
||||||
set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "" FORCE)
|
set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "" FORCE)
|
||||||
set(gRPC_ABSL_PROVIDER "module" CACHE STRING "" FORCE)
|
set(gRPC_ABSL_PROVIDER "module" CACHE STRING "" FORCE)
|
||||||
@@ -59,7 +66,7 @@ set(protobuf_WITH_ZLIB ON CACHE BOOL "" FORCE)
|
|||||||
|
|
||||||
# Abseil configuration
|
# Abseil configuration
|
||||||
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
|
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
|
||||||
set(ABSL_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
|
set(ABSL_ENABLE_INSTALL ON CACHE BOOL "" FORCE)
|
||||||
set(ABSL_BUILD_TESTING OFF CACHE BOOL "" FORCE)
|
set(ABSL_BUILD_TESTING OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# Declare gRPC - use v1.62.0 which fixes health_check_client incomplete type bug
|
# Declare gRPC - use v1.62.0 which fixes health_check_client incomplete type bug
|
||||||
@@ -150,7 +157,7 @@ function(target_add_protobuf target)
|
|||||||
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"
|
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"
|
||||||
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"
|
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"
|
||||||
)
|
)
|
||||||
target_include_directories(${target} PRIVATE
|
target_include_directories(${target} PUBLIC
|
||||||
$<BUILD_INTERFACE:${_gRPC_PROTO_GENS_DIR}>
|
$<BUILD_INTERFACE:${_gRPC_PROTO_GENS_DIR}>
|
||||||
$<BUILD_INTERFACE:${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}>
|
$<BUILD_INTERFACE:${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ if(YAZE_USE_MODULAR_BUILD)
|
|||||||
include(app/gui/gui_library.cmake)
|
include(app/gui/gui_library.cmake)
|
||||||
include(app/zelda3/zelda3_library.cmake)
|
include(app/zelda3/zelda3_library.cmake)
|
||||||
|
|
||||||
if(YAZE_BUILD_EMU AND NOT YAZE_WITH_GRPC)
|
if(YAZE_BUILD_EMU)
|
||||||
include(app/emu/emu_library.cmake)
|
include(app/emu/emu_library.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ if (YAZE_BUILD_LIB)
|
|||||||
target_link_libraries(yaze_core INTERFACE yaze_agent)
|
target_link_libraries(yaze_core INTERFACE yaze_agent)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(YAZE_BUILD_EMU AND NOT YAZE_WITH_GRPC AND TARGET yaze_emulator)
|
if(YAZE_BUILD_EMU AND TARGET yaze_emulator)
|
||||||
target_link_libraries(yaze_core INTERFACE yaze_emulator)
|
target_link_libraries(yaze_core INTERFACE yaze_emulator)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ if (YAZE_BUILD_LIB)
|
|||||||
target_link_libraries(yaze_c PRIVATE yaze_agent)
|
target_link_libraries(yaze_c PRIVATE yaze_agent)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(YAZE_BUILD_EMU AND NOT YAZE_WITH_GRPC AND TARGET yaze_emulator)
|
if(YAZE_BUILD_EMU AND TARGET yaze_emulator)
|
||||||
target_link_libraries(yaze_c PRIVATE yaze_emulator)
|
target_link_libraries(yaze_c PRIVATE yaze_emulator)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ if(YAZE_USE_MODULAR_BUILD)
|
|||||||
list(APPEND _yaze_modular_links yaze_agent)
|
list(APPEND _yaze_modular_links yaze_agent)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(YAZE_BUILD_EMU AND NOT YAZE_WITH_GRPC AND TARGET yaze_emulator)
|
if(YAZE_BUILD_EMU AND TARGET yaze_emulator)
|
||||||
list(APPEND _yaze_modular_links yaze_emulator)
|
list(APPEND _yaze_modular_links yaze_emulator)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ target_sources(yaze_core_lib PRIVATE
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(YAZE_WITH_GRPC)
|
if(YAZE_WITH_GRPC)
|
||||||
|
target_include_directories(yaze_core_lib PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}/third_party/json/include)
|
||||||
|
target_compile_definitions(yaze_core_lib PRIVATE YAZE_WITH_JSON)
|
||||||
|
|
||||||
target_add_protobuf(yaze_core_lib
|
target_add_protobuf(yaze_core_lib
|
||||||
${CMAKE_SOURCE_DIR}/src/app/core/proto/imgui_test_harness.proto)
|
${CMAKE_SOURCE_DIR}/src/app/core/proto/imgui_test_harness.proto)
|
||||||
|
|
||||||
|
|||||||
@@ -52,43 +52,6 @@ void KeepDynamicTestData(const std::shared_ptr<DynamicTestData>& data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::yaze::test::GetTestStatusResponse_Status ConvertHarnessStatus(
|
|
||||||
::yaze::test::HarnessTestStatus status) {
|
|
||||||
switch (status) {
|
|
||||||
case ::yaze::test::HarnessTestStatus::kQueued:
|
|
||||||
return ::yaze::test::GetTestStatusResponse::STATUS_QUEUED;
|
|
||||||
case ::yaze::test::HarnessTestStatus::kRunning:
|
|
||||||
return ::yaze::test::GetTestStatusResponse::STATUS_RUNNING;
|
|
||||||
case ::yaze::test::HarnessTestStatus::kPassed:
|
|
||||||
return ::yaze::test::GetTestStatusResponse::STATUS_PASSED;
|
|
||||||
case ::yaze::test::HarnessTestStatus::kFailed:
|
|
||||||
return ::yaze::test::GetTestStatusResponse::STATUS_FAILED;
|
|
||||||
case ::yaze::test::HarnessTestStatus::kTimeout:
|
|
||||||
return ::yaze::test::GetTestStatusResponse::STATUS_TIMEOUT;
|
|
||||||
case ::yaze::test::HarnessTestStatus::kUnspecified:
|
|
||||||
default:
|
|
||||||
return ::yaze::test::GetTestStatusResponse::STATUS_UNSPECIFIED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t ToUnixMillisSafe(absl::Time timestamp) {
|
|
||||||
if (timestamp == absl::InfinitePast()) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return absl::ToUnixMillis(timestamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t ClampDurationToInt32(absl::Duration duration) {
|
|
||||||
int64_t millis = absl::ToInt64Milliseconds(duration);
|
|
||||||
if (millis > std::numeric_limits<int32_t>::max()) {
|
|
||||||
return std::numeric_limits<int32_t>::max();
|
|
||||||
}
|
|
||||||
if (millis < std::numeric_limits<int32_t>::min()) {
|
|
||||||
return std::numeric_limits<int32_t>::min();
|
|
||||||
}
|
|
||||||
return static_cast<int32_t>(millis);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RunDynamicTest(ImGuiTestContext* ctx) {
|
void RunDynamicTest(ImGuiTestContext* ctx) {
|
||||||
auto* data = (DynamicTestData*)ctx->Test->UserData;
|
auto* data = (DynamicTestData*)ctx->Test->UserData;
|
||||||
if (data && data->test_func) {
|
if (data && data->test_func) {
|
||||||
@@ -127,6 +90,47 @@ struct RPCState {
|
|||||||
} // namespace
|
} // namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
::yaze::test::GetTestStatusResponse_Status ConvertHarnessStatus(
|
||||||
|
::yaze::test::HarnessTestStatus status) {
|
||||||
|
switch (status) {
|
||||||
|
case ::yaze::test::HarnessTestStatus::kQueued:
|
||||||
|
return ::yaze::test::GetTestStatusResponse::STATUS_QUEUED;
|
||||||
|
case ::yaze::test::HarnessTestStatus::kRunning:
|
||||||
|
return ::yaze::test::GetTestStatusResponse::STATUS_RUNNING;
|
||||||
|
case ::yaze::test::HarnessTestStatus::kPassed:
|
||||||
|
return ::yaze::test::GetTestStatusResponse::STATUS_PASSED;
|
||||||
|
case ::yaze::test::HarnessTestStatus::kFailed:
|
||||||
|
return ::yaze::test::GetTestStatusResponse::STATUS_FAILED;
|
||||||
|
case ::yaze::test::HarnessTestStatus::kTimeout:
|
||||||
|
return ::yaze::test::GetTestStatusResponse::STATUS_TIMEOUT;
|
||||||
|
case ::yaze::test::HarnessTestStatus::kUnspecified:
|
||||||
|
default:
|
||||||
|
return ::yaze::test::GetTestStatusResponse::STATUS_UNSPECIFIED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int64_t ToUnixMillisSafe(absl::Time timestamp) {
|
||||||
|
if (timestamp == absl::InfinitePast()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return absl::ToUnixMillis(timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ClampDurationToInt32(absl::Duration duration) {
|
||||||
|
int64_t millis = absl::ToInt64Milliseconds(duration);
|
||||||
|
if (millis > std::numeric_limits<int32_t>::max()) {
|
||||||
|
return std::numeric_limits<int32_t>::max();
|
||||||
|
}
|
||||||
|
if (millis < std::numeric_limits<int32_t>::min()) {
|
||||||
|
return std::numeric_limits<int32_t>::min();
|
||||||
|
}
|
||||||
|
return static_cast<int32_t>(millis);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
#include <grpcpp/grpcpp.h>
|
#include <grpcpp/grpcpp.h>
|
||||||
#include <grpcpp/server_builder.h>
|
#include <grpcpp/server_builder.h>
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ set(YAZE_AGENT_SOURCES
|
|||||||
cli/service/planning/tile16_proposal_generator.cc
|
cli/service/planning/tile16_proposal_generator.cc
|
||||||
cli/service/resources/resource_catalog.cc
|
cli/service/resources/resource_catalog.cc
|
||||||
cli/service/resources/resource_context_builder.cc
|
cli/service/resources/resource_context_builder.cc
|
||||||
|
cli/handlers/overworld_inspect.cc
|
||||||
|
cli/flags.cc
|
||||||
cli/service/rom/rom_sandbox_manager.cc
|
cli/service/rom/rom_sandbox_manager.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "absl/flags/declare.h"
|
||||||
#include "absl/flags/flag.h"
|
#include "absl/flags/flag.h"
|
||||||
#include "absl/strings/str_format.h"
|
#include "absl/strings/str_format.h"
|
||||||
#include "absl/strings/match.h"
|
#include "absl/strings/match.h"
|
||||||
@@ -14,7 +15,7 @@
|
|||||||
#include "yaze_config.h"
|
#include "yaze_config.h"
|
||||||
|
|
||||||
ABSL_FLAG(bool, tui, false, "Launch Text User Interface");
|
ABSL_FLAG(bool, tui, false, "Launch Text User Interface");
|
||||||
ABSL_FLAG(std::string, rom, "", "Path to the ROM file");
|
ABSL_DECLARE_FLAG(std::string, rom);
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|||||||
5
src/cli/flags.cc
Normal file
5
src/cli/flags.cc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "absl/flags/flag.h"
|
||||||
|
|
||||||
|
ABSL_FLAG(std::string, rom, "", "Path to the ROM file");
|
||||||
@@ -65,6 +65,7 @@ add_executable(
|
|||||||
cli/handlers/agent/test_common.cc
|
cli/handlers/agent/test_common.cc
|
||||||
cli/handlers/agent/test_commands.cc
|
cli/handlers/agent/test_commands.cc
|
||||||
cli/handlers/agent/gui_commands.cc
|
cli/handlers/agent/gui_commands.cc
|
||||||
|
cli/flags.cc
|
||||||
cli/modern_cli.cc
|
cli/modern_cli.cc
|
||||||
cli/tui/asar_patch.cc
|
cli/tui/asar_patch.cc
|
||||||
cli/tui/palette_editor.cc
|
cli/tui/palette_editor.cc
|
||||||
|
|||||||
Reference in New Issue
Block a user