[136] | 1 | project(EigenDoc)
|
---|
| 2 |
|
---|
| 3 | set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
---|
| 4 |
|
---|
| 5 | project(EigenDoc)
|
---|
| 6 |
|
---|
| 7 | if(CMAKE_COMPILER_IS_GNUCXX)
|
---|
| 8 | if(CMAKE_SYSTEM_NAME MATCHES Linux)
|
---|
| 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g1")
|
---|
| 10 | endif(CMAKE_SYSTEM_NAME MATCHES Linux)
|
---|
| 11 | endif(CMAKE_COMPILER_IS_GNUCXX)
|
---|
| 12 |
|
---|
| 13 | # Set some Doxygen flags
|
---|
| 14 | set(EIGEN_DOXY_PROJECT_NAME "Eigen")
|
---|
| 15 | set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "")
|
---|
| 16 | set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/Eigen\" \"${Eigen_SOURCE_DIR}/doc\"")
|
---|
| 17 | set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "220")
|
---|
| 18 | set(EIGEN_DOXY_TAGFILES "")
|
---|
| 19 |
|
---|
| 20 | configure_file(
|
---|
| 21 | ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
|
---|
| 22 | ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
---|
| 23 | )
|
---|
| 24 |
|
---|
| 25 | set(EIGEN_DOXY_PROJECT_NAME "Eigen-unsupported")
|
---|
| 26 | set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "/unsupported")
|
---|
| 27 | set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/unsupported/Eigen\" \"${Eigen_SOURCE_DIR}/unsupported/doc\"")
|
---|
| 28 | set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "0")
|
---|
| 29 | # set(EIGEN_DOXY_TAGFILES "\"${Eigen_BINARY_DIR}/doc/eigen.doxytags =../\"")
|
---|
| 30 | set(EIGEN_DOXY_TAGFILES "")
|
---|
| 31 |
|
---|
| 32 | configure_file(
|
---|
| 33 | ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
|
---|
| 34 | ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported
|
---|
| 35 | )
|
---|
| 36 |
|
---|
| 37 | configure_file(
|
---|
| 38 | ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in
|
---|
| 39 | ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html
|
---|
| 40 | )
|
---|
| 41 |
|
---|
| 42 | configure_file(
|
---|
| 43 | ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in
|
---|
| 44 | ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html
|
---|
| 45 | )
|
---|
| 46 |
|
---|
| 47 | configure_file(
|
---|
| 48 | ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_layout.xml.in
|
---|
| 49 | ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_layout.xml
|
---|
| 50 | )
|
---|
| 51 |
|
---|
| 52 | configure_file(
|
---|
| 53 | ${Eigen_SOURCE_DIR}/unsupported/doc/eigendoxy_layout.xml.in
|
---|
| 54 | ${Eigen_BINARY_DIR}/doc/unsupported/eigendoxy_layout.xml
|
---|
| 55 | )
|
---|
| 56 |
|
---|
| 57 | set(examples_targets "")
|
---|
| 58 | set(snippets_targets "")
|
---|
| 59 |
|
---|
| 60 | add_definitions("-DEIGEN_MAKING_DOCS")
|
---|
| 61 | add_custom_target(all_examples)
|
---|
| 62 |
|
---|
| 63 | add_subdirectory(examples)
|
---|
| 64 | add_subdirectory(special_examples)
|
---|
| 65 | add_subdirectory(snippets)
|
---|
| 66 |
|
---|
| 67 | add_custom_target(
|
---|
| 68 | doc-eigen-prerequisites
|
---|
| 69 | ALL
|
---|
| 70 | COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/
|
---|
| 71 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/
|
---|
| 72 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/
|
---|
| 73 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt ${CMAKE_CURRENT_BINARY_DIR}/html/
|
---|
| 74 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
---|
| 75 | )
|
---|
| 76 |
|
---|
| 77 | add_custom_target(
|
---|
| 78 | doc-unsupported-prerequisites
|
---|
| 79 | ALL
|
---|
| 80 | COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported
|
---|
| 81 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
|
---|
| 82 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
|
---|
| 83 | WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc
|
---|
| 84 | )
|
---|
| 85 |
|
---|
| 86 | add_dependencies(doc-eigen-prerequisites all_snippets all_examples)
|
---|
| 87 | add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)
|
---|
| 88 |
|
---|
| 89 | add_custom_target(doc ALL
|
---|
| 90 | COMMAND doxygen
|
---|
| 91 | COMMAND doxygen Doxyfile-unsupported
|
---|
| 92 | COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_BINARY_DIR}/doc/html/group__TopicUnalignedArrayAssert.html ${Eigen_BINARY_DIR}/doc/html/TopicUnalignedArrayAssert.html
|
---|
| 93 | COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
|
---|
| 94 | COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz
|
---|
| 95 | COMMAND ${CMAKE_COMMAND} -E tar cfz eigen-doc.tgz eigen-doc
|
---|
| 96 | COMMAND ${CMAKE_COMMAND} -E rename eigen-doc.tgz eigen-doc/eigen-doc.tgz
|
---|
| 97 | COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
|
---|
| 98 | WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
|
---|
| 99 |
|
---|
| 100 | add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)
|
---|