[SampleProfileLoader] Fix integer overflow in generateMDProfMetadata (#90217)
[llvm-project.git] / mlir / lib / ExecutionEngine / SparseTensor / CMakeLists.txt
blob15024b2475b91f54517925bc2b469edf96a2cc3b
1 # Unlike mlir_float16_utils, mlir_c_runner_utils, etc, we do *not* make
2 # this a shared library: because doing so causes issues when building
3 # 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, since
7 # that is reserved/intended for shared libraries only.
8 add_mlir_library(MLIRSparseTensorRuntime
9   File.cpp
10   MapRef.cpp
11   Storage.cpp
13   EXCLUDE_FROM_LIBMLIR
15   LINK_LIBS PUBLIC
16   MLIRSparseTensorEnums
17   mlir_float16_utils
18   )
19 set_property(TARGET MLIRSparseTensorRuntime PROPERTY CXX_STANDARD 17)
21 check_cxx_compiler_flag(-Wweak-vtables
22   COMPILER_SUPPORTS_WARNING_WEAK_VTABLES)
23 if(COMPILER_SUPPORTS_WARNING_WEAK_VTABLES)
24   target_compile_options(MLIRSparseTensorRuntime PUBLIC
25     "-Wweak-vtables")
26 endif()