Convert some hardcoded flags to expressions

* Remove the continuable-coroutines interface target
This commit is contained in:
Denis Blank 2018-01-24 01:29:11 +01:00
parent 356e99dba7
commit c81d45c7ea
4 changed files with 13 additions and 24 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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