diff --git a/paddle/contrib/inference/CMakeLists.txt b/paddle/contrib/inference/CMakeLists.txt index a4fe10f708e5bb8b28e34b2d91b2254c346c467f..bea30fb673205d58c6b0ac539c546062b620dd6c 100644 --- a/paddle/contrib/inference/CMakeLists.txt +++ b/paddle/contrib/inference/CMakeLists.txt @@ -13,6 +13,8 @@ # limitations under the License. # +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=pessimizing-move") + function(inference_api_test TARGET_NAME TEST_SRC DEP_TEST) set(options "") set(oneValueArgs "") diff --git a/paddle/contrib/inference/paddle_inference_api_impl.cc b/paddle/contrib/inference/paddle_inference_api_impl.cc index 349bd3b40368956dd9656ce7f062525f2612e5c1..e7a0b341dda1ca8d2ccfc0d6c12a7ac3d4c691d5 100644 --- a/paddle/contrib/inference/paddle_inference_api_impl.cc +++ b/paddle/contrib/inference/paddle_inference_api_impl.cc @@ -141,7 +141,7 @@ std::unique_ptr PaddlePredictorImpl::Clone() { return nullptr; } // fix manylinux compile error. - return cls; + return std::move(cls); } // TODO(panyx0718): Consider merge with Init()?