mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Convert some hardcoded flags to expressions
* Remove the continuable-coroutines interface target
This commit is contained in:
parent
356e99dba7
commit
c81d45c7ea
@ -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
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/await>
|
||||
$<$<CXX_COMPILER_ID:CLANG>:-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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user