Don't configure Python tests when bindings are disabled (#12532) This is consistent with other test rules we have (e.g. lit and check tests require the compiler be enabled). This came up in https://github.com/openxla/iree/pull/12017, which adds an e2e Python test that we try to run on CI builds that don't have the Python bindings enabled.
diff --git a/build_tools/cmake/iree_python.cmake b/build_tools/cmake/iree_python.cmake index 5aaab3f..b5dcdd3 100644 --- a/build_tools/cmake/iree_python.cmake +++ b/build_tools/cmake/iree_python.cmake
@@ -279,6 +279,9 @@ "ARGS;LABELS;TIMEOUT" ${ARGN} ) + if(NOT IREE_BUILD_PYTHON_BINDINGS) + return() + endif() iree_local_py_test( NAME