Gating network behind compile flag

This commit is contained in:
2026-08-11 12:52:38 -05:00
parent 5f34cb34b2
commit 830864aa8a
281 changed files with 334 additions and 13204 deletions
+7 -2
View File
@@ -4,11 +4,16 @@
# https://opensource.org/licenses/MIT
function(dusk_run_python CMAKE_TARGET_NAME PYTHON_MODULE)
cmake_parse_arguments(DUSK_RUN_PYTHON "" "OUTPUT" "DEPENDS;ARGS" ${ARGN})
find_package(Python3 COMPONENTS Interpreter REQUIRED)
add_custom_target(${CMAKE_TARGET_NAME} ALL
add_custom_command(
OUTPUT ${DUSK_RUN_PYTHON_OUTPUT}
WORKING_DIRECTORY ${DUSK_ROOT_DIR}
COMMAND
${Python3_EXECUTABLE} -m ${PYTHON_MODULE} ${ARGN}
${Python3_EXECUTABLE} -m ${PYTHON_MODULE} ${DUSK_RUN_PYTHON_ARGS}
DEPENDS ${DUSK_RUN_PYTHON_DEPENDS}
VERBATIM
)
add_custom_target(${CMAKE_TARGET_NAME} DEPENDS ${DUSK_RUN_PYTHON_OUTPUT})
endfunction()