Skip to content

Commit

Permalink
Change message from FATAL_ERROR to WARNING
Browse files Browse the repository at this point in the history
- FATAL_ERROR could make it difficult to determine the underlying problem, like missing gcc multilib
- better to throw warnings and fail building
  • Loading branch information
dvsku committed Jun 3, 2024
1 parent 2fb3116 commit 07314ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ IF(UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
CHECK_CXX_COMPILER_FLAG("-fcoroutines" LIBNETWRK_SUPPORTS_COROUTINES)

IF(NOT LIBNETWRK_SUPPORTS_CONCEPTS)
MESSAGE(FATAL_ERROR "Compiler doesn't support concepts.")
MESSAGE(WARNING "Compiler doesn't support concepts.")
ENDIF()

IF(NOT LIBNETWRK_SUPPORTS_COROUTINES)
MESSAGE(FATAL_ERROR "Compiler doesn't support coroutines.")
MESSAGE(WARNING "Compiler doesn't support coroutines.")
ENDIF()

TARGET_COMPILE_OPTIONS(libnetwrk INTERFACE "-fconcepts")
Expand All @@ -33,7 +33,7 @@ ENDIF()
IF(LIBNETWRK_HAS_COROUTINE)
TARGET_COMPILE_DEFINITIONS(libnetwrk INTERFACE -DASIO_HAS_STD_COROUTINE)
ELSE()
MESSAGE(FATAL_ERROR "Failed to find coroutine headers.'")
MESSAGE(WARNING "Failed to find coroutine headers.'")
ENDIF()

TARGET_COMPILE_DEFINITIONS(libnetwrk INTERFACE -DASIO_HAS_CO_AWAIT)

0 comments on commit 07314ce

Please sign in to comment.