2020-06-19 14:28:30 +08:00
|
|
|
################################################################################
|
|
|
|
# NPCOMPPythonCommon
|
|
|
|
################################################################################
|
|
|
|
|
2020-07-02 12:28:04 +08:00
|
|
|
if(MSVC)
|
|
|
|
# Exceptions and RTTI
|
|
|
|
set(extension_cflags "/EHsc /GR")
|
|
|
|
else()
|
|
|
|
set(extension_cflags "-frtti -fexceptions")
|
|
|
|
endif()
|
|
|
|
|
2020-06-19 14:28:30 +08:00
|
|
|
set(PYBIND_SOURCES
|
2020-06-19 09:02:39 +08:00
|
|
|
MlirInit.cpp
|
|
|
|
MlirIr.cpp
|
|
|
|
MlirPass.cpp
|
|
|
|
NpcompDialect.cpp
|
|
|
|
PybindUtils.cpp
|
|
|
|
CoreDialects.cpp
|
|
|
|
)
|
2020-06-19 14:28:30 +08:00
|
|
|
set_source_files_properties(
|
|
|
|
${PYBIND_SOURCES}
|
2020-07-02 12:28:04 +08:00
|
|
|
PROPERTIES COMPILE_FLAGS "${extension_cflags}")
|
2020-06-19 14:28:30 +08:00
|
|
|
|
|
|
|
add_library(NPCOMPPythonCommon
|
|
|
|
${PYBIND_SOURCES}
|
|
|
|
)
|
2020-06-19 09:02:39 +08:00
|
|
|
|
|
|
|
target_link_libraries(NPCOMPPythonCommon
|
|
|
|
pybind11::module
|
|
|
|
|
|
|
|
NPCOMPInitAll
|
|
|
|
|
|
|
|
# Core dialects
|
|
|
|
MLIRSCF
|
|
|
|
|
|
|
|
# Upstream depends
|
|
|
|
LLVMSupport
|
|
|
|
MLIRDialect
|
|
|
|
MLIREDSC
|
|
|
|
MLIREDSCInterface
|
|
|
|
MLIRIR
|
|
|
|
MLIRLLVMIR
|
|
|
|
MLIRPass
|
|
|
|
MLIRTransforms
|
|
|
|
)
|