CMakeLists.txt 872 字节
Newer Older
L
Luo Tao 已提交
1 2 3 4 5 6 7 8 9
# 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")

10 11 12
set(IMPORT_PADDLE_STRING "import paddle")
set(IMPORT_PADDLEV2_STRING "import paddle.v2")

L
Luo Tao 已提交
13
configure_file(
L
Luo Tao 已提交
14
    "${CMAKE_CURRENT_SOURCE_DIR}/../../templates/conf.py.en.in"
L
Luo Tao 已提交
15 16 17
    "${BINARY_BUILD_DIR_EN}/conf.py"
    @ONLY)

18
sphinx_add_target(paddle_v2_apis
L
Luo Tao 已提交
19 20 21 22 23
                  html
                  ${BINARY_BUILD_DIR_EN}
                  ${SPHINX_CACHE_DIR_EN}
                  ${CMAKE_CURRENT_SOURCE_DIR}
                  ${SPHINX_HTML_DIR_EN})
_青葱's avatar
_青葱 已提交
24

25
add_dependencies(paddle_v2_apis  gen_proto_py framework_py_proto copy_paddle_pybind paddle_python)