2009-10-03 00:45:24 +08:00
|
|
|
project(EigenDoc)
|
2008-08-27 07:07:33 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
2007-12-21 17:30:32 +08:00
|
|
|
|
2009-05-17 18:12:39 +08:00
|
|
|
project(EigenDoc)
|
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g1")
|
|
|
|
endif(CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
|
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
2008-05-28 12:38:16 +08:00
|
|
|
|
2014-07-18 20:34:58 +08:00
|
|
|
option(EIGEN_INTERNAL_DOCUMENTATION "Build internal documentation" OFF)
|
|
|
|
|
|
|
|
|
2013-01-11 17:41:26 +08:00
|
|
|
# Set some Doxygen flags
|
|
|
|
set(EIGEN_DOXY_PROJECT_NAME "Eigen")
|
|
|
|
set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "")
|
|
|
|
set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/Eigen\" \"${Eigen_SOURCE_DIR}/doc\"")
|
|
|
|
set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "220")
|
|
|
|
set(EIGEN_DOXY_TAGFILES "")
|
2014-07-18 20:34:58 +08:00
|
|
|
if(EIGEN_INTERNAL_DOCUMENTATION)
|
|
|
|
set(EIGEN_DOXY_INTERNAL "YES")
|
|
|
|
else(EIGEN_INTERNAL_DOCUMENTATION)
|
|
|
|
set(EIGEN_DOXY_INTERNAL "NO")
|
|
|
|
endif(EIGEN_INTERNAL_DOCUMENTATION)
|
2013-01-11 17:41:26 +08:00
|
|
|
|
2009-02-04 23:37:00 +08:00
|
|
|
configure_file(
|
2013-01-11 17:41:26 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
2009-02-04 23:37:00 +08:00
|
|
|
)
|
|
|
|
|
2013-01-11 17:41:26 +08:00
|
|
|
set(EIGEN_DOXY_PROJECT_NAME "Eigen-unsupported")
|
|
|
|
set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "/unsupported")
|
|
|
|
set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/unsupported/Eigen\" \"${Eigen_SOURCE_DIR}/unsupported/doc\"")
|
|
|
|
set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "0")
|
|
|
|
# set(EIGEN_DOXY_TAGFILES "\"${Eigen_BINARY_DIR}/doc/eigen.doxytags =../\"")
|
|
|
|
set(EIGEN_DOXY_TAGFILES "")
|
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
configure_file(
|
2007-12-21 17:02:24 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
|
2013-01-11 17:41:26 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported
|
2007-12-21 17:02:24 +08:00
|
|
|
)
|
2007-09-28 14:17:36 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
configure_file(
|
2008-08-25 18:49:53 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html
|
|
|
|
)
|
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
configure_file(
|
2008-08-25 18:49:53 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html
|
|
|
|
)
|
|
|
|
|
Big changes in Eigen documentation:
- Organize the documentation into "chapters".
- Each chapter include many documentation pages, reference pages organized as modules, and a quick reference page.
- The "Chapters" tree is created using the defgroup/ingroup mechanism, even for the documentation pages (i.e., .dox files for which I added an \eigenManualPage macro that we can switch between \page or \defgroup ).
- Add a "General topics" entry for all pages that do not fit well in the previous "chapters".
- The highlevel struture is managed by a new eigendoxy_layout.xml file.
- remove the "index" and quite useless pages (namespace list, class hierarchy, member list, file list, etc.)
- add the javascript search-engine.
- add the "treeview" panel.
- remove \tableofcontents (replace them by a custom \eigenAutoToc macro to be able to easily re-enable if needed).
- add javascript to automatically generate a TOC from the h1/h2 tags of the current page, and put the TOC in the left side panel.
- overload various javascript function generated by doxygen to:
- remove the root of the treeview
- remove links to section/subsection from the treeview
- automatically expand the "Chapters" section
- automatically expand the current section
- adjust the height of the treeview to take into account the TOC
- always use the default .css file, eigendoxy.css now only includes our modifications
- use Doxyfile to specify our logo
- remove cross references to unsupported modules (temporarily)
2013-01-05 23:37:11 +08:00
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_layout.xml.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_layout.xml
|
|
|
|
)
|
|
|
|
|
2013-01-11 17:41:26 +08:00
|
|
|
configure_file(
|
|
|
|
${Eigen_SOURCE_DIR}/unsupported/doc/eigendoxy_layout.xml.in
|
|
|
|
${Eigen_BINARY_DIR}/doc/unsupported/eigendoxy_layout.xml
|
|
|
|
)
|
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
set(examples_targets "")
|
|
|
|
set(snippets_targets "")
|
2007-12-21 19:29:04 +08:00
|
|
|
|
2011-02-07 01:51:42 +08:00
|
|
|
add_definitions("-DEIGEN_MAKING_DOCS")
|
2012-08-27 17:11:25 +08:00
|
|
|
add_custom_target(all_examples)
|
2008-12-07 07:20:30 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
add_subdirectory(examples)
|
2012-06-20 15:28:32 +08:00
|
|
|
add_subdirectory(special_examples)
|
2008-12-02 20:59:10 +08:00
|
|
|
add_subdirectory(snippets)
|
2007-12-21 17:30:32 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
add_custom_target(
|
2009-03-11 21:11:38 +08:00
|
|
|
doc-eigen-prerequisites
|
2007-12-21 19:29:04 +08:00
|
|
|
ALL
|
2008-08-27 14:43:42 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/
|
2013-01-11 17:41:26 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/
|
2016-07-12 22:45:43 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2pnode.png ${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2node.png ${CMAKE_CURRENT_BINARY_DIR}/html/
|
2013-01-11 17:41:26 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt ${CMAKE_CURRENT_BINARY_DIR}/html/
|
2007-12-21 19:29:04 +08:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
)
|
|
|
|
|
2009-02-04 23:37:00 +08:00
|
|
|
add_custom_target(
|
2009-03-11 21:11:38 +08:00
|
|
|
doc-unsupported-prerequisites
|
2009-02-04 23:37:00 +08:00
|
|
|
ALL
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported
|
2013-01-11 17:41:26 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
|
2016-07-12 22:45:43 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2pnode.png ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2node.png ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
|
2009-02-04 23:37:00 +08:00
|
|
|
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc
|
|
|
|
)
|
|
|
|
|
2009-03-11 21:11:38 +08:00
|
|
|
add_dependencies(doc-eigen-prerequisites all_snippets all_examples)
|
2009-12-12 02:39:01 +08:00
|
|
|
add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)
|
2011-11-06 04:59:36 +08:00
|
|
|
|
2009-03-11 21:11:38 +08:00
|
|
|
add_custom_target(doc ALL
|
|
|
|
COMMAND doxygen
|
2013-01-11 17:41:26 +08:00
|
|
|
COMMAND doxygen Doxyfile-unsupported
|
2014-09-08 04:38:09 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_BINARY_DIR}/doc/html/group__TopicUnalignedArrayAssert.html ${Eigen_BINARY_DIR}/doc/html/TopicUnalignedArrayAssert.html
|
2011-11-06 04:59:36 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
|
2012-08-27 16:56:44 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz
|
2015-02-18 22:47:01 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E tar cfz eigen-doc.tgz eigen-doc
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E rename eigen-doc.tgz eigen-doc/eigen-doc.tgz
|
2011-11-06 04:59:36 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
|
2012-08-27 17:11:25 +08:00
|
|
|
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
|
2011-11-06 04:59:36 +08:00
|
|
|
|
2009-03-11 21:11:38 +08:00
|
|
|
add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)
|