Use RunProgram.cmake not GeneratePYX.cmake.

This commit is contained in:
Ryan Curtin
2019-01-24 12:14:28 -05:00
parent 3ec1f2ad2a
commit 2bf1adbbf6
2 changed files with 3 additions and 11 deletions
-8
View File
@@ -1,8 +0,0 @@
# GeneratePYX.cmake: a CMake script that actually runs the given program to
# generate a .pyx file.
#
# This script depends on the following arguments:
#
# GENERATE_PYX_PROGRAM: the program to run to generate the .pyx file.
# PYX_OUTPUT_FILE: the file to store the output in.
execute_process(COMMAND ${GENERATE_PYX_PROGRAM} OUTPUT_FILE ${PYX_OUTPUT_FILE})
+3 -3
View File
@@ -203,9 +203,9 @@ if (BUILD_PYTHON_BINDINGS)
-DBINDING_TYPE=BINDING_TYPE_PYX)
add_custom_command(TARGET generate_pyx_${name} POST_BUILD
COMMAND ${CMAKE_COMMAND}
-DGENERATE_PYX_PROGRAM=${CMAKE_BINARY_DIR}/bin/generate_pyx_${name}
-DPYX_OUTPUT_FILE=${CMAKE_BINARY_DIR}/src/mlpack/bindings/python/mlpack/${name}.pyx
-P ${CMAKE_SOURCE_DIR}/CMake/GeneratePYX.cmake)
-DPROGRAM=${CMAKE_BINARY_DIR}/bin/generate_pyx_${name}
-DOUTPUT_FILE=${CMAKE_BINARY_DIR}/src/mlpack/bindings/python/mlpack/${name}.pyx
-P ${CMAKE_SOURCE_DIR}/CMake/RunProgram.cmake)
# Build the pyx. Since distutils doesn't support a parallel build, we'll
# enforce it here. Although this will always be rebuilt, that's okay because