Skip to content

Commit 590b47d

Browse files
committed
Merge pull request #200 from arrayfire/arrayfire-release-test
Find the python interpreter using cmake
2 parents ad00a99 + 7aba3d0 commit 590b47d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/library/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515
# ########################################################################
1616

17+
find_package(PythonInterp REQUIRED)
1718

1819

1920

@@ -202,7 +203,7 @@ set( AUTOGEMM_PRECOMPILE_HEADER_SRC ${CMAKE_SOURCE_DIR}/library/blas/AutoGemm/Ke
202203
set( AUTOGEMM_PRECOMPILE_HEADER_OUT ${CMAKE_BINARY_DIR}/include/AutoGemmIncludes/AutoGemmKernelsToPreCompile.h )
203204
add_custom_command(
204205
OUTPUT ${AUTOGEMM_PRECOMPILE_HEADER_OUT}
205-
COMMAND python ${CMAKE_SOURCE_DIR}/library/blas/AutoGemm/KernelsToPreCompile.py ${AGPC_ARGS}
206+
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/library/blas/AutoGemm/KernelsToPreCompile.py ${AGPC_ARGS}
206207
DEPENDS ${AUTOGEMM_PRECOMPILE_HEADER_SRC}
207208
)
208209

@@ -243,7 +244,7 @@ endif()#endif precompile active
243244
################################################################################
244245
add_custom_command(
245246
OUTPUT ${AUTOGEMM_HEADERS} ${AUTOGEMM_SRC}
246-
COMMAND python ${CMAKE_SOURCE_DIR}/library/blas/AutoGemm/AutoGemm.py --output-path ${CMAKE_BINARY_DIR}/include --opencl-compiler-version ${OPENCL_VERSION} --architecture ${AUTOGEMM_ARCHITECTURE}
247+
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/library/blas/AutoGemm/AutoGemm.py --output-path ${CMAKE_BINARY_DIR}/include --opencl-compiler-version ${OPENCL_VERSION} --architecture ${AUTOGEMM_ARCHITECTURE}
247248
DEPENDS ${AUTOGEMM_SCRIPTS}
248249
)
249250

0 commit comments

Comments
 (0)