Skip to content

Commit f539569

Browse files
authored
Update AddMLIRPython.cmake
Remove GENERATE from add_python_modules
1 parent 8da6462 commit f539569

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mlir/cmake/modules/AddMLIRPython.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,11 @@ endfunction()
300300
# DAG of source modules is included.
301301
# COMMON_CAPI_LINK_LIBS: List of dylibs (typically one) to make every
302302
# extension depend on (see mlir_python_add_common_capi_library).
303-
# GENERATE_TYPE_STUBS: Enable type stub generation for all modules
304-
# which have declared type stub generation with `declare_mlir_python_extension`.
305303
# PACKAGE_PREFIX: Same as MLIR_PYTHON_PACKAGE_PREFIX not including trailing `.`.
306304
# This is used to determine type stub generation python module names.
307305
function(add_mlir_python_modules name)
308306
cmake_parse_arguments(ARG
309-
"GENERATE_TYPE_STUBS"
307+
""
310308
"ROOT_PREFIX;INSTALL_PREFIX;PACKAGE_PREFIX"
311309
"COMMON_CAPI_LINK_LIBS;DECLARED_SOURCES"
312310
${ARGN})
@@ -348,7 +346,7 @@ function(add_mlir_python_modules name)
348346
# `_extension_target` is the actual dylib target that's built just above with `add_mlir_python_extension`.
349347
# That's why dependencies are in terms of `_extension_target`.
350348
get_target_property(_generate_type_stubs ${sources_target} mlir_python_GENERATE_TYPE_STUBS)
351-
if(ARG_GENERATE_TYPE_STUBS AND _generate_type_stubs)
349+
if(_generate_type_stubs)
352350
if ((NOT ARG_PACKAGE_PREFIX) OR ("${ARG_PACKAGE_PREFIX}" STREQUAL ""))
353351
message(FATAL_ERROR "GENERATE_TYPE_STUBS requires PACKAGE_PREFIX for ${name}")
354352
endif()

0 commit comments

Comments
 (0)