From 2bf1adbbf65be371e4fabd6e6aca0987d33bda70 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 24 Jan 2019 12:14:28 -0500 Subject: [PATCH] Use RunProgram.cmake not GeneratePYX.cmake. --- CMake/GeneratePYX.cmake | 8 -------- src/mlpack/bindings/python/CMakeLists.txt | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 CMake/GeneratePYX.cmake diff --git a/CMake/GeneratePYX.cmake b/CMake/GeneratePYX.cmake deleted file mode 100644 index a42c061949..0000000000 --- a/CMake/GeneratePYX.cmake +++ /dev/null @@ -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}) diff --git a/src/mlpack/bindings/python/CMakeLists.txt b/src/mlpack/bindings/python/CMakeLists.txt index 9da328d926..b69f1ca567 100644 --- a/src/mlpack/bindings/python/CMakeLists.txt +++ b/src/mlpack/bindings/python/CMakeLists.txt @@ -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