- Added new entries to `.pre-commit-config.yaml`, `cmake-format.yaml`, and `.github/dependabot.yml` to improve code quality checks and dependency updates. - Enhanced GitHub Actions workflows by adding new steps for testing and build retention. - Introduced support for the nlohmann_json library in CMake, allowing for conditional inclusion based on the `YAZE_ENABLE_JSON` option. - Updated CMake configurations to streamline SDL2 and gRPC integration, ensuring proper linking and target management. Benefits: - Improves code quality and consistency through automated checks and formatting. - Enhances dependency management and build reliability across platforms. - Provides flexibility for users to enable optional features, improving overall functionality.
23 lines
586 B
CMake
23 lines
586 B
CMake
# Linux GCC Toolchain
|
|
# Optimized for Ubuntu 22.04+ with GCC 12+
|
|
|
|
set(CMAKE_SYSTEM_NAME Linux)
|
|
set(CMAKE_C_COMPILER gcc)
|
|
set(CMAKE_CXX_COMPILER g++)
|
|
|
|
# Set C++ standard
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
# Compiler flags
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
|
|
|
|
# Link flags
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
|
|
|
|
# Find packages
|
|
find_package(PkgConfig REQUIRED)
|
|
|