Skip to content

cmake: only link stdc++fs for GCC < 9#2640

Merged
julianoes merged 1 commit intomavlink:mainfrom
grembeter:nostdc++fs
Aug 14, 2025
Merged

cmake: only link stdc++fs for GCC < 9#2640
julianoes merged 1 commit intomavlink:mainfrom
grembeter:nostdc++fs

Conversation

@grembeter
Copy link
Copy Markdown
Contributor

Newer GCC versions (>= 9) include the C++17 filesystem library in libstdc++ by default, so linking stdc++fs explicitly is unnecessary and may cause build errors.

Update the CMake condition to link stdc++fs only when using GCC < 9, while keeping the existing exclusions for Apple, Android, and MSVC.

Newer GCC versions (>= 9) include the C++17 filesystem library in
libstdc++ by default, so linking stdc++fs explicitly is unnecessary
and may cause build errors.

Update the CMake condition to link stdc++fs only when using GCC < 9,
while keeping the existing exclusions for Apple, Android, and MSVC.
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I wonder if we actually support GCC < 9 at this point.

@julianoes julianoes merged commit a853ee9 into mavlink:main Aug 14, 2025
54 checks passed
@reedev
Copy link
Copy Markdown
Contributor

reedev commented Aug 14, 2025

Thanks. I wonder if we actually support GCC < 9 at this point.

Fyi on the Jetson Nano we have gcc 8 when using via the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants