- Updated `.clangd` configuration to include additional include paths and feature flags tailored for ROM hacking workflows, optimizing IntelliSense support. - Introduced `.pre-commit-config.yaml` for managing code quality checks and formatting, ensuring consistent code style across the project. - Added `cmake-format.yaml` for CMake formatting configuration, promoting adherence to style guidelines. - Enhanced CI workflows to include new actions for testing and building, improving overall reliability and efficiency in the development process. Benefits: - Streamlines development setup and improves code quality through automated checks. - Facilitates better collaboration by ensuring consistent coding standards and configurations.
25 lines
698 B
CMake
25 lines
698 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)
|