Fix CMake compiler coroutine flags (#7404)
This commit is contained in:
parent
89c93980f3
commit
b886367128
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue