CMakeLists.txt 1.93 KB
Newer Older
Paul's avatar
Paul committed
1

2
3
4
5
project(migraphx-doc)
find_package(ROCM REQUIRED)

include(ROCMDoxygenDoc)
Paul's avatar
Paul committed
6
7

set(DOXYGEN_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/doxygen/)
8
rocm_add_doxygen_doc(
Paul's avatar
Paul committed
9
10
    OUTPUT_DIRECTORY ${DOXYGEN_OUTPUT}
    INPUT 
Paul's avatar
Paul committed
11
        ${PROJECT_SOURCE_DIR}/src
Paul's avatar
Paul committed
12
    INCLUDE_PATH
Paul's avatar
Paul committed
13
14
15
16
17
18
19
        ${PROJECT_SOURCE_DIR}/src/include
        ${PROJECT_SOURCE_DIR}/src/targets/cpu/include
        ${PROJECT_SOURCE_DIR}/src/targets/gpu/include
    STRIP_FROM_INC_PATH
        ${PROJECT_SOURCE_DIR}/src/include
        ${PROJECT_SOURCE_DIR}/src/targets/cpu/include
        ${PROJECT_SOURCE_DIR}/src/targets/gpu/include
20
21
22
    EXCLUDE_PATTERNS
        ${PROJECT_SOURCE_DIR}/src/targets/gpu/kernels
        ${PROJECT_SOURCE_DIR}/src/targets/gpu/device
Paul's avatar
Paul committed
23
    SEARCH_INCLUDES YES
Paul's avatar
Paul committed
24
25
26
27
28
29
30
31
    MACRO_EXPANSION YES
    RECURSIVE YES
    GENERATE_XML YES
    GENERATE_LATEX YES
    USE_PDFLATEX YES
    CALL_GRAPH YES
    CALLER_GRAPH YES
    BUILTIN_STL_SUPPORT YES
Paul's avatar
Paul committed
32
    PROJECT_NAME MIGraphX
Paul's avatar
Paul committed
33
34
35
36
37
38
39
40
    SORT_MEMBERS_CTORS_1ST YES
    SOURCE_BROWSER YES
    GENERATE_TREEVIEW YES
    REFERENCED_BY_RELATION YES
    REFERENCES_RELATION YES
    REFERENCES_LINK_SOURCE YES
    EXTRACT_ALL YES
    ENUM_VALUES_PER_LINE 1
Paul's avatar
Paul committed
41
    FULL_PATH_NAMES YES
Paul's avatar
Paul committed
42
    PREDEFINED DOXYGEN
Paul's avatar
Paul committed
43
44
)

45
46
include(ROCMSphinxDoc)
rocm_add_sphinx_doc(src 
Paul's avatar
Paul committed
47
48
49
50
51
    BUILDER html 
    OUTPUT_DIR html 
    VARS 
        breathe_projects.proj=${DOXYGEN_OUTPUT}/xml
        breathe_default_project=proj
52
    DEPENDS doxygen
Paul's avatar
Paul committed
53
)
Paul's avatar
Paul committed
54

Paul's avatar
Paul committed
55
56
find_package(LATEX)
if(LATEX_FOUND)
57
    rocm_add_sphinx_doc(src 
Paul's avatar
Paul committed
58
59
60
61
62
63
64
65
66
67
68
        BUILDER latex
        OUTPUT_DIR pdf
        VARS 
            breathe_projects.proj=${DOXYGEN_OUTPUT}/xml
            breathe_default_project=proj
        DEPENDS doxygen
    )
else()
    message("Latex builder not found. Latex builder is required only for building the PDF documentation for MIGraph and is not necessary for building the library, or any other components. To build PDF documentation run make in ${CMAKE_CURRENT_SOURCE_DIR}/pdf, once a latex builder is installed.")
endif()