CMake: Unconditionally require C++11 or greater (#2522)

This commit is contained in:
Patrick Stewart 2020-08-28 05:01:47 +01:00 committed by GitHub
parent 45eccaecaf
commit ef4f91ae5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,12 +312,7 @@ function(verilate TARGET)
"$<$<BOOL:$<TARGET_PROPERTY:VERILATOR_THREADED>>:${VERILATOR_MT_CFLAGS}>"
)
# SystemC requires the C++ version to match the library version, avoid setting anything here
set(GEN_THREADED $<BOOL:$<TARGET_PROPERTY:VERILATOR_THREADED>>)
set(GEN_SYSTEMC $<BOOL:$<TARGET_PROPERTY:VERILATOR_SYSTEMC>>)
target_compile_features(${TARGET} PRIVATE
$<$<AND:${GEN_THREADED},$<NOT:${GEN_SYSTEMC}>>:cxx_std_11>
)
target_compile_features(${TARGET} PRIVATE cxx_std_11)
endfunction()
function(_verilator_find_systemc)