From 0b4cc4c073527b07fbadc069f5dfc7691c130855 Mon Sep 17 00:00:00 2001 From: liu zhengxi <380185688@qq.com> Date: Sat, 3 Jul 2021 11:52:05 +0800 Subject: [PATCH] make cmake friendly to user (#668) --- paddlenlp/ops/cmake/external/boost.cmake | 2 ++ paddlenlp/ops/faster_transformer/src/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/paddlenlp/ops/cmake/external/boost.cmake b/paddlenlp/ops/cmake/external/boost.cmake index f210bcf955c05..3140c7a48f46b 100644 --- a/paddlenlp/ops/cmake/external/boost.cmake +++ b/paddlenlp/ops/cmake/external/boost.cmake @@ -27,6 +27,8 @@ set(BOOST_URL "http://paddlepaddledeps.bj.bcebos.com/${BOOST_TAR}.tar.gz" CACHE MESSAGE(STATUS "BOOST_TAR: ${BOOST_TAR}, BOOST_URL: ${BOOST_URL}") +set(THIRD_PARTY_PATH ${CMAKE_BINARY_DIR}/${THIRD_PATH}/source) + set(BOOST_SOURCES_DIR ${THIRD_PARTY_PATH}/boost) set(BOOST_DOWNLOAD_DIR "${BOOST_SOURCES_DIR}/src/${BOOST_PROJECT}") diff --git a/paddlenlp/ops/faster_transformer/src/CMakeLists.txt b/paddlenlp/ops/faster_transformer/src/CMakeLists.txt index 1f069ea9c27a3..512d73fd50868 100644 --- a/paddlenlp/ops/faster_transformer/src/CMakeLists.txt +++ b/paddlenlp/ops/faster_transformer/src/CMakeLists.txt @@ -1,5 +1,7 @@ add_definitions(-DNDEBUG) add_definitions(-DPADDLE_CUDA) +# Default is 1 in standard c++ when using gcc8.2 +add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1) if(ON_INFER) add_definitions(-DPADDLE_ON_INFERENCE)