torch-mlir/lib/Python/CMakeLists.txt

46 lines
829 B
CMake
Raw Normal View History

################################################################################
# NPCOMPPythonCommon
################################################################################
if(MSVC)
# Exceptions and RTTI
set(extension_cflags "/EHsc /GR")
else()
set(extension_cflags "-frtti -fexceptions")
endif()
set(PYBIND_SOURCES
MlirInit.cpp
MlirIr.cpp
MlirPass.cpp
NpcompDialect.cpp
PybindUtils.cpp
CoreDialects.cpp
)
set_source_files_properties(
${PYBIND_SOURCES}
PROPERTIES COMPILE_FLAGS "${extension_cflags}")
add_library(NPCOMPPythonCommon
${PYBIND_SOURCES}
)
target_link_libraries(NPCOMPPythonCommon
pybind11::module
NPCOMPInitAll
# Core dialects
MLIRSCF
# Upstream depends
LLVMSupport
MLIRDialect
MLIREDSC
MLIREDSCInterface
MLIRIR
MLIRLLVMIR
MLIRPass
MLIRTransforms
)