mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 01:52:17 +02:00
Fix CMake compiler coroutine flags (#7404)
This commit is contained in:
@@ -239,6 +239,7 @@ Sebastien Van Cauwenberghe
|
||||
Sergey Fedorov
|
||||
Sergi Granell
|
||||
Seth Pellegrino
|
||||
Shogo Yamazaki
|
||||
Shou-Li Hsu
|
||||
Srinivasan Venkataramanan
|
||||
Stefan Wallentowitz
|
||||
|
||||
@@ -743,15 +743,16 @@ function(verilate TARGET)
|
||||
|
||||
target_link_libraries(${TARGET} PUBLIC ${VERILATOR_MT_CFLAGS})
|
||||
|
||||
target_compile_features(${TARGET} PRIVATE cxx_std_11)
|
||||
|
||||
if(${VERILATE_PREFIX}_TIMING)
|
||||
check_cxx_compiler_flag(-fcoroutines-ts COROUTINES_TS_FLAG)
|
||||
target_compile_options(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
$<IF:$<BOOL:${COROUTINES_TS_FLAG}>,-fcoroutines-ts,-fcoroutines>
|
||||
)
|
||||
if("@CFG_CXXFLAGS_COROUTINES@" STREQUAL "-std=gnu++20")
|
||||
target_compile_features(${TARGET} PRIVATE cxx_std_20)
|
||||
else()
|
||||
target_compile_options(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
@CFG_CXXFLAGS_COROUTINES@
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user