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
|
target_link_libraries(continuable-base
|
||||||
INTERFACE
|
INTERFACE
|
||||||
Threads::Threads
|
Threads::Threads)
|
||||||
continuable-coroutines)
|
|
||||||
|
|
||||||
target_compile_features(continuable-base
|
target_compile_features(continuable-base
|
||||||
INTERFACE
|
INTERFACE
|
||||||
@ -57,6 +56,17 @@ target_compile_features(continuable-base
|
|||||||
cxx_trailing_return_types
|
cxx_trailing_return_types
|
||||||
cxx_return_type_deduction)
|
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 INTERFACE)
|
||||||
add_library(continuable::continuable ALIAS continuable)
|
add_library(continuable::continuable ALIAS continuable)
|
||||||
|
|
||||||
@ -66,7 +76,7 @@ target_link_libraries(continuable
|
|||||||
function2)
|
function2)
|
||||||
|
|
||||||
# Create an install target
|
# Create an install target
|
||||||
install(TARGETS continuable-coroutines continuable-base continuable
|
install(TARGETS continuable-base continuable
|
||||||
EXPORT continuable-config
|
EXPORT continuable-config
|
||||||
INCLUDES DESTINATION include)
|
INCLUDES DESTINATION include)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
add_library(continuable-features-flags INTERFACE)
|
add_library(continuable-features-flags INTERFACE)
|
||||||
add_library(continuable-features-warnings INTERFACE)
|
add_library(continuable-features-warnings INTERFACE)
|
||||||
add_library(continuable-features-noexcept INTERFACE)
|
add_library(continuable-features-noexcept INTERFACE)
|
||||||
add_library(continuable-coroutines INTERFACE)
|
|
||||||
|
|
||||||
include(cmake/configure_compiler.cmake)
|
include(cmake/configure_compiler.cmake)
|
||||||
|
|||||||
@ -5,16 +5,6 @@ target_compile_options(continuable-features-warnings
|
|||||||
-pedantic
|
-pedantic
|
||||||
-Wextra)
|
-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)
|
if (CTI_CONTINUABLE_WITH_NO_EXCEPTIONS)
|
||||||
target_compile_options(continuable-features-noexcept
|
target_compile_options(continuable-features-noexcept
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|||||||
@ -19,16 +19,6 @@ target_compile_options(continuable-features-warnings
|
|||||||
INTERFACE
|
INTERFACE
|
||||||
/W4)
|
/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)
|
if (CTI_CONTINUABLE_WITH_NO_EXCEPTIONS)
|
||||||
target_compile_definitions(continuable-features-noexcept
|
target_compile_definitions(continuable-features-noexcept
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user