Merged
Conversation
This commit adds ARM64 architecture support to all platform jobs in the GitHub Actions workflow: - Windows: Added windows-11-arm64 runner - Ubuntu: Added ubuntu-24.04-arm64 runner - MacOS: Added macos-14 runner (Apple Silicon ARM64) Each job now uses a matrix strategy to test on both x86_64 and ARM64 architectures, ensuring compatibility across different platforms and processor architectures.
Corrected the workflow to use only free, publicly available ARM64 runners: - Ubuntu: Fixed label from ubuntu-24.04-arm64 to ubuntu-24.04-arm - Windows: Removed ARM64 (windows-11-arm64 only available for paid plans) - MacOS: Kept macos-13 (Intel) and macos-14 (Apple Silicon ARM64) This ensures the workflow will run successfully on free public repositories with ARM64 support on Linux and macOS platforms.
GoogleTest v1.14.0 requires C++17 or later. Added target_compile_features to explicitly set C++17 as the minimum standard for the tests executable. This fixes the build error on macOS 13: "C++ versions less than C++17 are not supported." Fixes build on platforms where the default C++ standard is less than C++17.
Updated the C++ standard configuration to use explicit CMake properties: - Set CMAKE_CXX_STANDARD=17, CMAKE_CXX_STANDARD_REQUIRED=ON, and CMAKE_CXX_EXTENSIONS=OFF at the file level (applies to GoogleTest) - Set target properties CXX_STANDARD=17, CXX_STANDARD_REQUIRED=ON, and CXX_EXTENSIONS=OFF on the tests executable This is more explicit and idiomatic than using target_compile_features, and ensures both the tests and fetched GoogleTest library build with proper C++17 standard without compiler extensions.
Fixed linker errors caused by ABI mismatch between GoogleTest and tests. The issue was that CMAKE_CXX_STANDARD variables were not being properly inherited by FetchContent-fetched GoogleTest. Changed to use CACHE FORCE variables which ensures GoogleTest builds with the same C++ standard as the tests, preventing std::string ABI mismatches. This fixes the undefined symbol errors on macOS 13: testing::internal::MakeAndRegisterTestInfo(std::__1::basic_string...)
Fixed the ABI mismatch by explicitly setting C++ standard properties on the gtest and gtest_main targets immediately after FetchContent creates them. This ensures GoogleTest libraries are compiled with the same C++17 standard as the tests. Previous approaches using cache variables didn't work because they were set too late in the configuration process. Setting target properties after FetchContent_MakeAvailable() is the correct way to control the C++ standard for fetched dependencies.
Removed macos-13 (Intel) runner and kept only macos-14 (Apple Silicon ARM64). This simplifies the workflow while still maintaining ARM64 coverage on macOS. macOS 13 was experiencing C++ standard issues with GoogleTest that were difficult to resolve, while macOS 14 builds successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build and test on linux/mac arm versions