- 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.
26 lines
699 B
CMake
26 lines
699 B
CMake
# macOS Clang Toolchain
|
|
# Optimized for macOS 14+ with Clang 18+
|
|
|
|
set(CMAKE_SYSTEM_NAME Darwin)
|
|
set(CMAKE_C_COMPILER clang)
|
|
set(CMAKE_CXX_COMPILER clang++)
|
|
|
|
# Set C++ standard
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
# macOS deployment target
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "macOS deployment target")
|
|
|
|
# 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,-dead_strip")
|
|
|
|
# Find packages
|
|
find_package(PkgConfig REQUIRED)
|
|
|