Skip to content

Commit

Permalink
Fix coroutines flag for older LLVM versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgunter committed Aug 3, 2024
1 parent b055675 commit 412eddd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ target_include_directories(
whirlwind INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include/>
)
target_link_libraries(whirlwind INTERFACE range-v3::range-v3 std::generator std::mdspan)

# When compiling with Clang<17, we need to add the `-fcoroutines-ts` flag.
target_compile_options(
whirlwind INTERFACE $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-fcoroutines>
whirlwind
INTERFACE
$<$<AND:$<$<COMPILE_LANG_AND_ID:CXX,Clang>,$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,17>:-fcoroutines-ts>
)

if(WHIRLWIND_TEST)
Expand Down

0 comments on commit 412eddd

Please sign in to comment.