27 lines · plain
1# Unlike mlir_float16_utils, mlir_c_runner_utils, etc, we do *not* make2# this a shared library: because doing so causes issues when building3# on Windows. In particular, various functions take/return `std::vector`4# but that class is not designed with dllimport/dllexport pragma,5# therefore it cannot be safely/correctly used across DLL boundaries.6# Consequently, we avoid using the "mlir_xxx_utils" naming scheme, since7# that is reserved/intended for shared libraries only.8add_mlir_library(MLIRSparseTensorRuntime9 File.cpp10 MapRef.cpp11 Storage.cpp12 13 EXCLUDE_FROM_LIBMLIR14 )15mlir_target_link_libraries(MLIRSparseTensorRuntime PUBLIC16 MLIRSparseTensorEnums17 mlir_float16_utils18 )19set_property(TARGET MLIRSparseTensorRuntime PROPERTY CXX_STANDARD 17)20 21check_cxx_compiler_flag(-Wweak-vtables22 COMPILER_SUPPORTS_WARNING_WEAK_VTABLES)23if(COMPILER_SUPPORTS_WARNING_WEAK_VTABLES)24 target_compile_options(MLIRSparseTensorRuntime PRIVATE25 "-Wweak-vtables")26endif()27