mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-01 01:10:34 +08:00
fix: std::ranges::views::join with LLVM clang 16 on darwin (#10309)
Reported-by: https://github.com/Cryolitia/nur-packages/actions/runs/10464433944/job/28978028891 Tested-by: https://github.com/Cryolitia/nur-packages/actions/runs/10469889715/job/28993864791
This commit is contained in:
committed by
GitHub
parent
e4ebac6f49
commit
d04509738d
@@ -48,7 +48,10 @@ else ()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
|
||||
target_compile_options(MaaCore PRIVATE "-Wno-restrict")
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
# LLVM clang 16 will failed with `error: no member named 'join' in namespace 'std::ranges::views'`, but Apple clang 16 won't
|
||||
# value defined in https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
|
||||
if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17))
|
||||
target_compile_options(MaaCore PRIVATE "-fexperimental-library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user