Skip to content
Prev 8706 / 12125 Next

[R-pkg-devel] Minimum macOS version ?

Dirk,

thanks, got it. If you have a work-around avoiding std::filesystem then can use something like

// no filesystem support before macOS Catalina
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500
// no std::filesystem
#endif

(derived from https://github.com/nlohmann/json/pull/3101 - some of the comments there may be of use - it also mentions MinGW etc.)

The "offical" macros for macOS availability tests are AvailabilityMacros.h but they boil down to the above.

Cheers,
Simon