Skip to content

Commit

Permalink
fix header match error (#38175)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwhql authored Dec 16, 2021
1 parent 861053e commit 4ef59f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmake/inference_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,16 @@ include_directories(${CMAKE_BINARY_DIR}/../paddle/fluid/framework/io)

# copy api headers for pten & custom op
copy(inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/api/ext/*
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/api/ext/*.h
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/pten/api/ext/)
copy(inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/api/include/*
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/api/include/*.h
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/pten/api/include/)
copy(inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/api/all.h
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/pten/api/)
copy(inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/common/*
SRCS ${PADDLE_SOURCE_DIR}/paddle/pten/common/*.h
${PADDLE_SOURCE_DIR}/paddle/fluid/platform/bfloat16.h
${PADDLE_SOURCE_DIR}/paddle/fluid/platform/complex.h
${PADDLE_SOURCE_DIR}/paddle/fluid/platform/float16.h
Expand Down
3 changes: 1 addition & 2 deletions cmake/pten.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ string(FIND ${TARGET_PATH} "experimental" pos)
if (pos GREATER 1)
file(GLOB HEADERS "${TARGET_PATH}/*" "*.h")
foreach(header ${HEADERS})
string(FIND ${header} ".h" hpos)
if (hpos GREATER 1)
if (${header} MATCHES ".*.h$")
file(READ ${header} HEADER_CONTENT)
string(REPLACE "paddle/pten/" "paddle/include/experimental/pten/" HEADER_CONTENT "${HEADER_CONTENT}")
string(REPLACE "paddle/utils/" "paddle/include/experimental/utils/" HEADER_CONTENT "${HEADER_CONTENT}")
Expand Down

0 comments on commit 4ef59f0

Please sign in to comment.