cmake: BuildFIO.cmake should not introduce -std=gnu++17

Not correct in general, and a build bug because fio-objectstore
includes c++20 headers.

Fixes: https://tracker.ceph.com/issues/62778

Add CXX_EXTENSIONS ON, and cleanup INTERFACE_COMPILE_OPTIONS per Kefu review

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Matt Benjamin 2023-09-08 17:48:39 -04:00
parent 794f4d16c6
commit e7779fefc6

View File

@ -37,6 +37,7 @@ function(build_fio)
add_library(fio INTERFACE IMPORTED)
add_dependencies(fio fio_ext)
set_target_properties(fio PROPERTIES
CXX_EXTENSIONS ON
INTERFACE_INCLUDE_DIRECTORIES ${source_dir}
INTERFACE_COMPILE_OPTIONS "-include;${source_dir}/config-host.h;$<$<COMPILE_LANGUAGE:C>:-std=gnu99>$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>")
INTERFACE_COMPILE_OPTIONS "-include;${source_dir}/config-host.h;$<$<COMPILE_LANGUAGE:C>:-std=gnu99>")
endfunction()