Repository navigation
nav2_mppi_controller: match AppleClang in the compiler check (backport #6816) - #6827
Merged
Merged
Conversation
The C++20 branch for clang ("Apple Clang: use C++20 ... omit -fconcepts")
checks CMAKE_CXX_COMPILER_ID STREQUAL "Clang", but Apple's compiler
reports "AppleClang", so it takes the GCC branch and gets -fconcepts:
clang++: error: unknown argument: '-fconcepts'. Use MATCHES "Clang" so
both Clang and AppleClang take the intended branch.
Tested with a CMake probe (cmake 4.x, same check) on macOS 27: AppleClang
now selects the C++20 branch; LLVM Clang and GCC 16 select the same
branch as before. Apple clang 21 rejects -fconcepts. No effect on GCC.
Signed-off-by: Dhruv Patel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 3267276)
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
jwallace42
self-requested a review
November 18, 2026 20:24
jwallace42
approved these changes
Nov 18, 2026
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.
Basic Info
Description of contribution in a few bullet points
nav2_mppi_controller/CMakeLists.txthas a branch for clang ("Apple Clang: use C++20 and optimization, omit -fconcepts"), but it checksCMAKE_CXX_COMPILER_ID STREQUAL "Clang". Apple's compiler reportsAppleClang, so it falls through to the GCC branch and gets-fconcepts, which fails:clang++: error: unknown argument: '-fconcepts'.MATCHES "Clang", so bothClangandAppleClangtake the intended branch. GCC is unaffected.Description of documentation updates required from your changes
Description of how this change was tested
cmake_minimum_required(VERSION 3.20)as in the package) on macOS 27:CMAKE_CXX_COMPILER_IDAppleClang-fconceptsbranchClangGNU-fconceptsbranch-fconceptsbranch-fconcepts(clang++: error: unknown argument: '-fconcepts').main's MPPI itself on macOS (my environment is Jazzy), so I'm relying on CI for Linux.Future work that may be required in bullet points
For Maintainers:
backport-*.🤖 Generated with Claude Code
This is an automatic backport of pull request #6816 done by [Mergify](https://mergify.com).