提交 a9b65948 编写于 作者: Y Yi Wang 提交者: GitHub

Merge pull request #3271 from reyoung/feature/make_in_build.sh

Only make install when it necessary in build.sh
...@@ -57,13 +57,11 @@ cmake .. \ ...@@ -57,13 +57,11 @@ cmake .. \
cat <<EOF cat <<EOF
============================================ ============================================
Building and installing in /paddle/build ... Building in /paddle/build ...
Build unit tests: ${WITH_TESTING:-OFF} Build unit tests: ${WITH_TESTING:-OFF}
============================================ ============================================
EOF EOF
make install -j `nproc` make -j `nproc`
pip install /usr/local/opt/paddle/share/wheels/*.whl
paddle version
if [ ${WITH_TESTING:-OFF} == "ON" ] && [ ${RUN_TEST:-OFF} == "ON" ] ; then if [ ${WITH_TESTING:-OFF} == "ON" ] && [ ${RUN_TEST:-OFF} == "ON" ] ; then
cat <<EOF cat <<EOF
...@@ -71,6 +69,10 @@ cat <<EOF ...@@ -71,6 +69,10 @@ cat <<EOF
Running unit tests ... Running unit tests ...
======================================== ========================================
EOF EOF
# make install should also be test when unittest
make install -j `nproc`
pip install /usr/local/opt/paddle/share/wheels/*.whl
paddle version
ctest --output-on-failure ctest --output-on-failure
fi fi
...@@ -86,6 +88,11 @@ Building documentation ... ...@@ -86,6 +88,11 @@ Building documentation ...
In /paddle/build_doc In /paddle/build_doc
======================================== ========================================
EOF EOF
# build documentation need install Paddle before
make install -j `nproc`
pip install /usr/local/opt/paddle/share/wheels/*.whl
paddle version
mkdir -p /paddle/build_doc mkdir -p /paddle/build_doc
pushd /paddle/build_doc pushd /paddle/build_doc
cmake .. \ cmake .. \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册