cmake: add checks to generate folly-config.h correctly
[folly.git] / folly / Portability.h
index b41893b59a017223bad2e590a8954495b945ad79..3831f04d43580d5601cb8919be6c5952af891221 100644 (file)
@@ -366,7 +366,9 @@ constexpr auto kMscVer = 0;
 #define FOLLY_CPP14_CONSTEXPR inline
 #endif
 
-#if __cpp_coroutines >= 201703L || (_MSC_VER && _RESUMABLE_FUNCTIONS_SUPPORTED)
+#if __cpp_coroutines >= 201703L && FOLLY_HAS_INCLUDE(<experimental/coroutine>)
+#define FOLLY_HAS_COROUTINES 1
+#elif _MSC_VER && _RESUMABLE_FUNCTIONS_SUPPORTED
 #define FOLLY_HAS_COROUTINES 1
 #endif