Skip to content

Conversation

kuguma
Copy link
Contributor

@kuguma kuguma commented Nov 15, 2023

Older xcode (at least xcode12) had a bug that defined macros for __cpp_lib_filesystem and __cpp_lib_variant even if the target did not support it.
When building for a target lower than macOS 10.15 with c++17, fmtlib compilation failed. (https://developer.apple.com/xcode/cpp/#c++17)

As a workaround, I would like to add a flag to disable std::filesystem and std::variant.

This problem seems to have been fixed in the latest xcode15, but I don't think version checking is practical.

Similar issues in other projects: ToruNiina/toml11#150

@vitaut vitaut merged commit 45e124e into fmtlib:master Nov 15, 2023
@vitaut
Copy link
Contributor

vitaut commented Nov 15, 2023

Thank you

happymonkey1 pushed a commit to happymonkey1/fmt that referenced this pull request Apr 7, 2024
* Added macros to disable std::filesystem and std::variant as a workaround for old xcode bugs

* Change macro to positive logic
@vitaut
Copy link
Contributor

vitaut commented May 31, 2025

Looks like xcode12 is no longer supported by Homebrew. @kuguma is this workaround still needed?

@kuguma
Copy link
Contributor Author

kuguma commented Jun 10, 2025

Looks like xcode12 is no longer supported by Homebrew. @kuguma is this workaround still needed?

Yes. but I think it would be a good idea to sort this out in a new version of fmtlib.

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.

2 participants