diff --git a/paddle/contrib/inference/CMakeLists.txt b/paddle/contrib/inference/CMakeLists.txt index bea30fb673205d58c6b0ac539c546062b620dd6c..5043e4e02c8cb3a6209c3f66d1f1faa6fa943fa6 100644 --- a/paddle/contrib/inference/CMakeLists.txt +++ b/paddle/contrib/inference/CMakeLists.txt @@ -13,7 +13,9 @@ # limitations under the License. # -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=pessimizing-move") +if(APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=pessimizing-move") +endif(APPLE) function(inference_api_test TARGET_NAME TEST_SRC DEP_TEST) set(options "")