Skip to content

Commit

Permalink
[cmake] Avoid generating python binaries for cmake cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
cmastalli committed Dec 6, 2023
1 parent 6ac9339 commit 642c3c9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down

0 comments on commit 642c3c9

Please sign in to comment.