1project(EigenDoc) 2 3set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE) 4 5project(EigenDoc) 6 7if(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) 11endif(CMAKE_COMPILER_IS_GNUCXX) 12 13configure_file( 14 ${Eigen_SOURCE_DIR}/unsupported/doc/Doxyfile.in 15 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported 16) 17 18configure_file( 19 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 20 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile 21) 22 23configure_file( 24 ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in 25 ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html 26) 27 28configure_file( 29 ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in 30 ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html 31) 32 33set(examples_targets "") 34set(snippets_targets "") 35 36add_definitions("-DEIGEN_MAKING_DOCS") 37 38add_subdirectory(examples) 39add_subdirectory(special_examples) 40add_subdirectory(snippets) 41 42add_custom_target( 43 doc-eigen-prerequisites 44 ALL 45 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/ 46 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_tabs.css 47 ${CMAKE_CURRENT_BINARY_DIR}/html/ 48 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png 49 ${CMAKE_CURRENT_BINARY_DIR}/html/ 50 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt 51 ${CMAKE_CURRENT_BINARY_DIR}/html/ 52 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 53) 54 55add_custom_target( 56 doc-unsupported-prerequisites 57 ALL 58 COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported 59 COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/eigendoxy_tabs.css 60 ${Eigen_BINARY_DIR}/doc/html/unsupported/ 61 COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/Eigen_Silly_Professor_64x64.png 62 ${Eigen_BINARY_DIR}/doc/html/unsupported/ 63 WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc 64) 65 66add_dependencies(doc-eigen-prerequisites all_snippets all_examples) 67add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples) 68 69add_custom_target(doc ALL 70 COMMAND doxygen Doxyfile-unsupported 71 COMMAND doxygen 72 COMMAND doxygen Doxyfile-unsupported # run doxygen twice to get proper eigen <=> unsupported cross references 73 COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc 74 COMMAND ${CMAKE_COMMAND} -E tar cvfz eigen-doc/eigen-doc.tgz eigen-doc/*.html eigen-doc/*.map eigen-doc/*.png eigen-doc/*.css eigen-doc/*.js eigen-doc/*.txt eigen-doc/unsupported 75 COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html 76 WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc) 77 78add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites) 79