Skip to content

Commit 0c15b6c

Browse files
authored
Merge pull request #6184 from luotao1/print_operators_doc
add WITH_DOC for print_operators_doc
2 parents 2a3a1e9 + 3e8c363 commit 0c15b6c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

paddle/pybind/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ if(WITH_PYTHON)
55
${GLOB_OP_LIB})
66
endif(WITH_PYTHON)
77

8-
cc_binary(print_operators_doc SRCS print_operators_doc.cc DEPS ${GLOB_OP_LIB})
8+
if(WITH_DOC)
9+
cc_binary(print_operators_doc SRCS print_operators_doc.cc DEPS ${GLOB_OP_LIB})
10+
endif(WITH_DOC)

paddle/scripts/docker/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,14 @@ EOF
185185
${DOCKERFILE_GPU_ENV}
186186
ADD go/cmd/pserver/pserver /usr/bin/
187187
ADD go/cmd/master/master /usr/bin/
188-
ADD paddle/pybind/print_operators_doc /usr/bin/
188+
EOF
189+
190+
if [[ ${WITH_DOC:-OFF} == 'ON' ]]; then
191+
cat >> /paddle/build/Dockerfile <<EOF
192+
ADD paddle/pybind/print_operators_doc /usr/bin/
193+
EOF
194+
fi
195+
cat >> /paddle/build/Dockerfile <<EOF
189196
# default command shows the paddle version and exit
190197
CMD ["paddle", "version"]
191198
EOF

0 commit comments

Comments
 (0)