Skip to content

Commit

Permalink
Add -fexperimental-library flag on Clang 16 to fix compile errors (#5416
Browse files Browse the repository at this point in the history
)

Fix compilation errors on newer Clang (upstream) versions which do not
fully support jthread and stop_token. Already used for AppleClang
variant.

x-ref
  - #5364
  - closes #5411

---
TYPE: NO_HISTORY
DESC: Add -fexperimental-library flag on Clang 16 to fix compile errors
  • Loading branch information
ihnorton authored Jan 3, 2025
1 parent 5ff4a35 commit 5f8ae4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ else()
endif()
endif()

if (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "16")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "16")
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fexperimental-library>)
endif()
endif()
Expand Down

0 comments on commit 5f8ae4c

Please sign in to comment.