From 642c3c99c1b33f682239a592732ab59b059250e5 Mon Sep 17 00:00:00 2001 From: Carlos Mastalli Date: Wed, 6 Dec 2023 12:45:23 +0000 Subject: [PATCH] [cmake] Avoid generating python binaries for cmake cmds --- examples/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 320f54e6fc..4caa2e39ea 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -20,7 +20,6 @@ set(${PROJECT_NAME}_EXAMPLES_PYTHON install(FILES __init__.py DESTINATION ${PYTHON_SITELIB}/${PROJECT_NAME}/examples) foreach(EXAMPLES ${${PROJECT_NAME}_EXAMPLES_PYTHON}) - python_build(. "${EXAMPLES}.py") install(FILES ${EXAMPLES}.py DESTINATION ${PYTHON_SITELIB}/${PROJECT_NAME}/examples) add_custom_target( @@ -30,8 +29,7 @@ foreach(EXAMPLES ${${PROJECT_NAME}_EXAMPLES_PYTHON}) env PYTHONPATH=${PROJECT_BINARY_DIR}/bindings/python:$ENV{PYTHONPATH} ${PYTHON_EXECUTABLE} - -c - "import ${EXAMPLES}" + "${PROJECT_SOURCE_DIR}/examples/${EXAMPLES}.py" \${INPUT}) # examples are too slow in Debug mode to be used as tests