Add patch to set -fcoroutines flag

This commit is contained in:
chausner 2021-09-05 12:35:11 +02:00
parent 50c10a5793
commit a23c736df9
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/cmake/coroutineOptions.cmake b/cmake/coroutineOptions.cmake
index 14a60c3..c13f3b3 100644
--- a/cmake/coroutineOptions.cmake
+++ b/cmake/coroutineOptions.cmake
@@ -14,6 +14,8 @@ function(target_coroutine_options TARGET)
target_compile_options(${TARGET} PUBLIC -stdlib=libc++ -fcoroutines-ts)
target_link_options(${TARGET} PUBLIC -stdlib=libc++)
set_target_properties(${TARGET} PROPERTIES CXX_EXTENSIONS NO)
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ target_compile_options(${TARGET} PUBLIC -fcoroutines)
else()
message(FATAL_ERROR "Compiler not supported: ${CMAKE_CXX_COMPILER_ID}")
endif()

View File

@ -5,6 +5,7 @@ vcpkg_from_github(
SHA512 48e3acca73c7b06940d41e84334cec56e7657c45f862d53e8e4ca1fb76b792c5b136ce4eeaf8afb8db95e746442fb45031c2c695ce60fcbe92ce91e5e1e80b25
HEAD_REF master
PATCHES
enable-coroutines-flag.patch
make-linkage-configurable.patch
fix-include-path.patch
)