Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should not write file to CMAKE_INSTALL_PREFIX when configuration #10823

Closed
reyoung opened this issue May 22, 2018 · 1 comment · Fixed by #10827
Closed

Should not write file to CMAKE_INSTALL_PREFIX when configuration #10823

reyoung opened this issue May 22, 2018 · 1 comment · Fixed by #10827
Assignees
Labels
预测 原名Inference,包含Capi预测问题等

Comments

@reyoung
Copy link
Collaborator

reyoung commented May 22, 2018

set(version_file ${CMAKE_INSTALL_PREFIX}/version.txt)
file(WRITE ${version_file}
"GIT COMMIT ID: ${PADDLE_GIT_COMMIT}\n"
"WITH_MKL: ${WITH_MKL}\n"
"WITH_GPU: ${WITH_GPU}\n")
if(WITH_GPU)
file(APPEND ${version_file}
"CUDA version: ${CUDA_VERSION}\n"
"CUDNN version: v${CUDNN_MAJOR_VERSION}\n")
endif()

This line will write files to CMAKE_INSTALL_PREFIX, which is not the good way to install file. Use install command of cmake.

This lines will make Paddle failed to compile when the user has no write permission to CMAKE_INSTALL_PREFIX.

@reyoung reyoung assigned Superjomn and luotao1 and unassigned Superjomn May 22, 2018
@luotao1 luotao1 added the 预测 原名Inference,包含Capi预测问题等 label May 22, 2018
@luotao1 luotao1 added this to To do in Inference on Engine via automation May 22, 2018
@luotao1
Copy link
Contributor

luotao1 commented May 22, 2018

Discussed with @reyoung, CMAKE_INSTALL_PREFIX will be changed to FLUID_INSTALL_DIR, and the default path of FLUID_INSTALL_DIR is ${CMAKE_BINARY_DIR}/fluid_install_dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
预测 原名Inference,包含Capi预测问题等
Projects
Development

Successfully merging a pull request may close this issue.

3 participants