Enable parallel tests.
[hoomd-blue.git] / doc / CMakeLists.txt
blobefbe0731a0cda37edf86b06ab59bf301ff013a1e
1 # Maintainer: joaander
3 if (DOXYGEN)
5 # policy change: always build all documentation even on platforms that don't
6 # have CUDA
7 set(DOXYGEN_PREDEFINED ${DOXYGEN_PREDEFINED} " \"ENABLE_CUDA=1\" \\
8     \"NVCC=1\" \\
9     \"BOOST_VERSION=103500\" ")
11 # build MPI documentation
12 set(DOXYGEN_PREDEFINED ${DOXYGEN_PREDEFINED} " \"ENABLE_MPI=1\" ")
14 # disable DOT in doxygen if dot is not found
15 if(DOXYGEN_DOT_PATH)
16     set(DOXYGEN_HAVE_DOT "YES")
17 else(DOXYGEN_DOT_PATH)
18     set(DOXYGEN_HAVE_DOT "NO")
19 endif(DOXYGEN_DOT_PATH)
21 # setup version number to be included in the documentation
22 set(DOXYGEN_HOOMD_VERSION ${HOOMD_VERSION_LONG})
24 # generate a list of source files to depend on
25 file(GLOB_RECURSE _source_files
26                   ${HOOMD_SOURCE_DIR}/libhoomd/*.h
27                   ${HOOMD_SOURCE_DIR}/libhoomd/*.cuh
28                   ${HOOMD_SOURCE_DIR}/libhoomd/*.cc
29                   ${HOOMD_SOURCE_DIR}/libhoomd/*.cu)
31 file(GLOB_RECURSE _dev_doc_sources
32                     ${CMAKE_CURRENT_SOURCE_DIR}/user/*.dox
33                     ${CMAKE_CURRENT_SOURCE_DIR}/dev/*.doc
34                     ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_dev.in)
36 # configure the doxygen file and target for the developer documentation
37 set(DOXYGEN_DEV_DOC_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/hoomd-devdoc-${HOOMD_VERSION}")
38 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_dev.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_dev)
39 add_custom_command (OUTPUT ${DOXYGEN_DEV_DOC_HTML_DIR}/index.html
40                     COMMAND ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_dev
41                     DEPENDS ${_source_files} ${_dev_doc_sources} ${_gle_images})
43 add_custom_target (dev ALL DEPENDS ${DOXYGEN_DEV_DOC_HTML_DIR}/index.html
44                            SOURCES ${_dev_doc_sources})
46 # configure the doxygen file and target for the user documentation
48 file(GLOB_RECURSE _module_files
49                   ${HOOMD_SOURCE_DIR}/python-module/*.py)
51 # custom html headers, footers and stylesheets have been created to make the
52 # doxygen docs fit in with the main HOOMD homepage. Enable them as an option
53 option(ENABLE_DOXYGEN_HOOMD_STYLE OFF "Enable the usage of the HOOMD homepage
54 stylesheet in processing the doxygen html")
55 mark_as_advanced(ENABLE_DOXYGEN_HOOMD_STYLE)
56 if (ENABLE_DOXYGEN_HOOMD_STYLE)
57     set(DOXYGEN_HTML_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/user/header.html)
58     set(DOXYGEN_HTML_FOOTER ${CMAKE_CURRENT_SOURCE_DIR}/user/footer.html)
59     set(DOXYGEN_HTML_EXTRA_STYLESHEET ${CMAKE_CURRENT_SOURCE_DIR}/user/header-style.css)
60     set(DOXYGEN_USE_MATHJAX YES)
61     set(DOXYGEN_DISABLE_INDEX YES)
62 else (ENABLE_DOXYGEN_HOOMD_STYLE)
63     set(DOXYGEN_HTML_HEADER "")
64     set(DOXYGEN_HTML_FOOTER "")
65     set(DOXYGEN_HTML_EXTRA_STYLESHEET "")
66     set(DOXYGEN_USE_MATHJAX NO)
67     set(DOXYGEN_DISABLE_INDEX NO)
68 endif (ENABLE_DOXYGEN_HOOMD_STYLE)
70 # configure the doxygen file
71 set(DOXYGEN_USER_DOC_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/hoomd-userdoc-${HOOMD_VERSION}")
72 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_user.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_user)
74 set (_user_doc_sources  ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_user.in
75                         ${CMAKE_CURRENT_SOURCE_DIR}/user/installation_guide.dox
76                         ${CMAKE_CURRENT_SOURCE_DIR}/user/quick_start.dox
77                         ${CMAKE_CURRENT_SOURCE_DIR}/user/examples.dox
78                         ${CMAKE_CURRENT_SOURCE_DIR}/user/index.dox
79                         ${CMAKE_CURRENT_SOURCE_DIR}/user/xml_file_format.dox
80                         ${CMAKE_CURRENT_SOURCE_DIR}/user/command_line_options.dox
81                         ${CMAKE_CURRENT_SOURCE_DIR}/user/conversion_scripts.dox
82                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide.dox
83                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide_mac.dox
84                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide_linux_ubuntu.dox
85                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide_linux_centos.dox
86                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide_linux_fedora.dox
87                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide_linux_opensuse.dox
88                         ${CMAKE_CURRENT_SOURCE_DIR}/user/compile_guide_linux_generic.dox
89                         ${CMAKE_CURRENT_SOURCE_DIR}/user/license.dox
90                         ${CMAKE_CURRENT_SOURCE_DIR}/user/citing.dox
91                         ${CMAKE_CURRENT_SOURCE_DIR}/user/credits.dox
92                         ${CMAKE_CURRENT_SOURCE_DIR}/user/header.html
93                         ${CMAKE_CURRENT_SOURCE_DIR}/user/footer.html
94                         ${CMAKE_CURRENT_SOURCE_DIR}/user/mpi.dox
95                         ${CMAKE_CURRENT_SOURCE_DIR}/user/box.dox
96                         ${CMAKE_CURRENT_SOURCE_DIR}/user/autotuner.dox
97                         ${CMAKE_CURRENT_SOURCE_DIR}/user/concepts.dox
98                         )
100 add_custom_command (OUTPUT ${DOXYGEN_USER_DOC_HTML_DIR}/index.html
101                     COMMAND ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_user
102                     DEPENDS ${_module_files}
103                     ${CMAKE_CURRENT_SOURCE_DIR}/user/*.dox
104                     ${CMAKE_CURRENT_SOURCE_DIR}/user/*.html
105                     ${CMAKE_CURRENT_SOURCE_DIR}/user/*.css
106                     ${CMAKE_CURRENT_SOURCE_DIR}/dev/*.doc
107                     ${HOOMD_SOURCE_DIR}/share/hoomd/examples/*
108                     ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_user.in)
110 add_custom_target (user ALL DEPENDS ${DOXYGEN_USER_DOC_HTML_DIR}/index.html
111                             SOURCES ${_user_doc_sources})
113 endif (DOXYGEN)