提交 c2272c6e 编写于 作者: Y Yu Yang

Only make install when it necessary in build.sh

上级 03a38b3d
...@@ -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.
先完成此消息的编辑!
想要评论请 注册