diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e536db..c7b50ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,7 @@ target_include_directories(continuable-base target_link_libraries(continuable-base INTERFACE - Threads::Threads - continuable-coroutines) + Threads::Threads) target_compile_features(continuable-base INTERFACE @@ -57,6 +56,17 @@ target_compile_features(continuable-base cxx_trailing_return_types cxx_return_type_deduction) +if (CTI_CONTINUABLE_WITH_AWAIT) + target_compile_options(continuable-base + INTERFACE + $<$:/await> + $<$:-fcoroutines-ts>) + + target_compile_definitions(continuable-base + INTERFACE + -DCONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) +endif() + add_library(continuable INTERFACE) add_library(continuable::continuable ALIAS continuable) @@ -66,7 +76,7 @@ target_link_libraries(continuable function2) # Create an install target -install(TARGETS continuable-coroutines continuable-base continuable +install(TARGETS continuable-base continuable EXPORT continuable-config INCLUDES DESTINATION include) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e7b8fbf..4af7ea3 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,6 +1,5 @@ add_library(continuable-features-flags INTERFACE) add_library(continuable-features-warnings INTERFACE) add_library(continuable-features-noexcept INTERFACE) -add_library(continuable-coroutines INTERFACE) include(cmake/configure_compiler.cmake) diff --git a/cmake/compiler/clang.cmake b/cmake/compiler/clang.cmake index 5c964ec..63e7a14 100644 --- a/cmake/compiler/clang.cmake +++ b/cmake/compiler/clang.cmake @@ -5,16 +5,6 @@ target_compile_options(continuable-features-warnings -pedantic -Wextra) -if (CTI_CONTINUABLE_WITH_AWAIT) - target_compile_options(continuable-coroutines - INTERFACE - -fcoroutines-ts) - - target_compile_definitions(continuable-coroutines - INTERFACE - -DCONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) -endif() - if (CTI_CONTINUABLE_WITH_NO_EXCEPTIONS) target_compile_options(continuable-features-noexcept INTERFACE diff --git a/cmake/compiler/msvc.cmake b/cmake/compiler/msvc.cmake index 753469b..9ede127 100644 --- a/cmake/compiler/msvc.cmake +++ b/cmake/compiler/msvc.cmake @@ -19,16 +19,6 @@ target_compile_options(continuable-features-warnings INTERFACE /W4) -if (CTI_CONTINUABLE_WITH_AWAIT) - target_compile_options(continuable-coroutines - INTERFACE - /await) - - target_compile_definitions(continuable-coroutines - INTERFACE - -DCONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) -endif() - if (CTI_CONTINUABLE_WITH_NO_EXCEPTIONS) target_compile_definitions(continuable-features-noexcept INTERFACE