File: CMakeLists.txt

package info (click to toggle)
sopt 4.2.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,632 kB
  • sloc: cpp: 13,011; xml: 182; makefile: 6
file content (32 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Set some Doxygen flags
set(SOPT_DOXY_PROJECT_NAME "SOPT")
set(SOPT_DOXY_PROJECT_BRIEF "Sparse OPTimisation")
set(SOPT_DOXY_INPUT "${PROJECT_SOURCE_DIR}/cpp")

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
)

file(COPY
  ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml
  DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
)


add_custom_target(doc ALL
  COMMAND doxygen
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})


# This will create a target in the Makefile that's used to push docs to github.io
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  add_custom_target(docweb
    COMMAND sed -i '' -e 's@namespacesopt@http://astro-informatics.github.io/sopt/&@g' -e 's@<filename>@&http://astro-informatics.github.io/sopt/@g' ${CMAKE_CURRENT_BINARY_DIR}/html/sopt.tag
    DEPENDS doc)
else()
  add_custom_target(docweb
    COMMAND sed -i -e 's@namespacesopt@http://astro-informatics.github.io/sopt/&@g' -e 's@<filename>@&http://astro-informatics.github.io/sopt/@g' ${CMAKE_CURRENT_BINARY_DIR}/html/sopt.tag
    DEPENDS doc)
endif()