Skip to content

Commit

Permalink
[ci] Workaround mingw defining libcpp_version with the old scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 14, 2024
1 parent a813921 commit bae07ce
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/ossia/detail/jthread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
#include <version>

#if __has_include(<stop_token>)
#if __cpp_lib_jthread >= 201911L
#define OSSIA_HAS_STD_JTHREAD 1
#if __cpp_lib_jthread >= 201911L
#define OSSIA_HAS_STD_JTHREAD 1

#elif (_LIBCPP_VERSION >= 18100) && (_LIBCPP_VERSION < 99999)
#if defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
#error Rebuild with -fexperimental-library, clang 18 ships headers which are incompatible with this file but hides half of them behind that flag
#else
#define OSSIA_HAS_STD_JTHREAD 1
#endif
#endif
#elif ((_LIBCPP_VERSION >= 18100) && (_LIBCPP_VERSION < 99999)) || (_LIBCPP_VERSION >= 180100)
#if defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
#error Rebuild with -fexperimental-library, clang 18 ships headers which are incompatible with this file but hides half of them behind that flag
#else
#define OSSIA_HAS_STD_JTHREAD 1
#endif

#endif
#endif

#if OSSIA_HAS_STD_JTHREAD
Expand Down

0 comments on commit bae07ce

Please sign in to comment.