diff --git a/cmake/Modules/coroutine.cmake b/cmake/Modules/coroutine.cmake index 00bf45d4b..d2634275d 100644 --- a/cmake/Modules/coroutine.cmake +++ b/cmake/Modules/coroutine.cmake @@ -29,12 +29,6 @@ function(kerbal_check_supports_coroutine_flags _Out_support) endfunction() -function(__kerbal_cache_not_supports_coroutine) - set(KERBAL_SUPPORT_COROUTINE False CACHE BOOL "Whether compiler support coroutine") - message(STATUS "set KERBAL_SUPPORT_COROUTINE = False") -endfunction() - - function(__kerbal_cache_result_of_supports_coroutine_flags support) set(flags ${ARGN}) set(KERBAL_SUPPORT_COROUTINE ${support} CACHE BOOL "Whether compiler support coroutine") @@ -90,7 +84,7 @@ function(kerbal_coroutine_required) if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") if ((CMAKE_CXX_STANDARD EQUAL 98) OR (CMAKE_CXX_STANDARD LESS 14)) - __kerbal_cache_not_supports_coroutine() + __kerbal_cache_result_of_supports_coroutine_flags(False) return() endif () set_property(GLOBAL PROPERTY KERBAL_FLAGS_TEST_COROUTINE -fcoroutines) @@ -99,7 +93,7 @@ function(kerbal_coroutine_required) ) elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") if ((CMAKE_CXX_STANDARD EQUAL 98) OR (CMAKE_CXX_STANDARD LESS 20)) - __kerbal_cache_not_supports_coroutine() + __kerbal_cache_result_of_supports_coroutine_flags(False) return() endif () set_property(GLOBAL PROPERTY KERBAL_FLAGS_TEST_COROUTINE -fcoroutines) @@ -114,7 +108,7 @@ function(kerbal_coroutine_required) KERBAL_FLAGS_TEST_COROUTINE_MSVC ) else () - __kerbal_cache_not_supports_coroutine() + __kerbal_cache_result_of_supports_coroutine_flags(False) endif () message("\n") endfunction()