From 2f0dc8463a48129647ebe3edb6924408712f63ba Mon Sep 17 00:00:00 2001 From: zhouwei25 <52485244+zhouwei25@users.noreply.github.com> Date: Mon, 19 Aug 2019 11:18:12 +0800 Subject: [PATCH] fix the bug that PYTHON_EXECUTABLE not exists (#19225) * test=develop,fix the inference library compilation bug on windows * test=develop,Fix the inference library compilation bug on windows * test=develop,fix the bug that PYTHON_EXECUTABLE not exists --- cmake/inference_lib.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1d3e43b5b88..87a7a1a86f1 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -14,6 +14,12 @@ # make package for paddle fluid shared and static library +if(WIN32) + if(NOT PYTHON_EXECUTABLE) + FIND_PACKAGE(PythonInterp REQUIRED) + endif() +endif() + set(COPY_SCRIPT_DIR ${PADDLE_SOURCE_DIR}/cmake) function(copy TARGET) set(options "") -- GitLab