Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#9532 from weixing02/fluid_api
Browse files Browse the repository at this point in the history
Fluid api
  • Loading branch information
luotao1 authored Mar 30, 2018
2 parents 63cd5fb + cd5d9a0 commit 33b8b3d
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 9 deletions.
7 changes: 7 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
add_custom_target(paddle_apis ALL
DEPENDS paddle_v2_apis paddle_fluid_apis)

add_custom_target(paddle_docs ALL
DEPENDS paddle_v2_docs paddle_v2_docs_cn
paddle_fluid_docs paddle_fluid_docs_cn)

add_subdirectory(v2)
add_subdirectory(fluid)
6 changes: 6 additions & 0 deletions doc/fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ sphinx_add_target(paddle_fluid_docs
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR_EN})

add_dependencies(paddle_fluid_docs gen_proto_py)

# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build")

Expand All @@ -47,3 +49,7 @@ sphinx_add_target(paddle_fluid_docs_cn
${SPHINX_CACHE_DIR_CN}
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR_CN})

add_dependencies(paddle_fluid_docs_cn gen_proto_py)

add_subdirectory(api)
22 changes: 22 additions & 0 deletions doc/fluid/api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build")

# Sphinx cache with pickled ReST documents
set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")

# HTML output director
set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html")

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/../../templates/conf.py.en.in"
"${BINARY_BUILD_DIR_EN}/conf.py"
@ONLY)

sphinx_add_target(paddle_fluid_apis
html
${BINARY_BUILD_DIR_EN}
${SPHINX_CACHE_DIR_EN}
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR_EN})

add_dependencies(paddle_fluid_apis gen_proto_py framework_py_proto copy_paddle_pybind)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions doc/v2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ configure_file(
"${BINARY_BUILD_DIR_EN}/conf.py"
@ONLY)

sphinx_add_target(paddle_docs
sphinx_add_target(paddle_v2_docs
html
${BINARY_BUILD_DIR_EN}
${SPHINX_CACHE_DIR_EN}
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR_EN})

add_dependencies(paddle_v2_docs gen_proto_py)

# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build")

Expand All @@ -41,11 +43,13 @@ configure_file(
"${BINARY_BUILD_DIR_CN}/conf.py"
@ONLY)

sphinx_add_target(paddle_docs_cn
sphinx_add_target(paddle_v2_docs_cn
html
${BINARY_BUILD_DIR_CN}
${SPHINX_CACHE_DIR_CN}
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR_CN})

add_dependencies(paddle_v2_docs_cn gen_proto_py)

add_subdirectory(api)
4 changes: 3 additions & 1 deletion doc/v2/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ configure_file(
"${BINARY_BUILD_DIR_EN}/conf.py"
@ONLY)

sphinx_add_target(paddle_api_docs
sphinx_add_target(paddle_v2_apis
html
${BINARY_BUILD_DIR_EN}
${SPHINX_CACHE_DIR_EN}
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR_EN})

add_dependencies(paddle_v2_apis gen_proto_py framework_py_proto copy_paddle_pybind)
5 changes: 2 additions & 3 deletions paddle/scripts/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ EOF
-DWITH_AVX=${WITH_AVX:-ON} \
-DWITH_SWIG_PY=ON \
-DWITH_STYLE_CHECK=OFF
make -j `nproc` gen_proto_py framework_py_proto
make -j `nproc` copy_paddle_pybind
make -j `nproc` paddle_docs paddle_docs_cn paddle_api_docs

make -j `nproc` paddle_docs paddle_apis
popd
fi

Expand Down
5 changes: 2 additions & 3 deletions paddle/scripts/travis/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ cd $TRAVIS_BUILD_DIR/build

# Compile Documentation only.
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_GPU=OFF -DWITH_MKL=OFF -DWITH_DOC=ON -DWITH_STYLE_CHECK=OFF
make -j `nproc` gen_proto_py framework_py_proto
make -j `nproc` copy_paddle_pybind
make -j `nproc` paddle_docs paddle_docs_cn paddle_api_docs

make -j `nproc` paddle_docs paddle_apis

# check websites for broken links
linkchecker doc/v2/en/html/index.html
Expand Down

0 comments on commit 33b8b3d

Please sign in to comment.