Skip to content

Commit 8868a54

Browse files
committed
use flags to fix the compile problem
1 parent 4736281 commit 8868a54

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

paddle/contrib/inference/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# limitations under the License.
1414
#
1515

16+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=pessimizing-move")
17+
1618
function(inference_api_test TARGET_NAME TEST_SRC DEP_TEST)
1719
set(options "")
1820
set(oneValueArgs "")

paddle/contrib/inference/paddle_inference_api_impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ std::unique_ptr<PaddlePredictor> PaddlePredictorImpl::Clone() {
141141
return nullptr;
142142
}
143143
// fix manylinux compile error.
144-
return cls;
144+
return std::move(cls);
145145
}
146146

147147
// TODO(panyx0718): Consider merge with Init()?

0 commit comments

Comments
 (0)