~ubuntu-branches/debian/sid/simpleitk/sid

« back to all changes in this revision

Viewing changes to Utilities/Doxygen/GenerateExamplesDox.cmake

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant
  • Date: 2017-11-02 08:49:18 UTC
  • Revision ID: package-import@ubuntu.com-20171102084918-7hs09ih668xq87ej
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Usage: cmake -D "PROJECT_SOURCE_DIR:PATH=${PROJECT_SOURCE_DIR}" 
 
3
#              -D "OUTPUT_FILE:PATH=${PROJECT_BINARY_DIR}/Examples.dox"
 
4
#              -P GenerateExamplesDox.cmake 
 
5
 
 
6
# This cmake script gets a lists of examples for the project and
 
7
# generates a file suitable for doxygen. The file is a list of
 
8
# "\examples filename", where doxygen will search for fileanme in it's
 
9
# example path. Doxygen should then generate an examples page with the
 
10
# referenced files.
 
11
 
 
12
# glob the examples for each language
 
13
file( GLOB_RECURSE EXAMPLES_LIST
 
14
  RELATIVE "${PROJECT_SOURCE_DIR}/Examples"
 
15
  "*.cxx"
 
16
  "*.py"
 
17
  "*.java"
 
18
  "*.tcl"
 
19
  "*.rb"
 
20
  "*.R"
 
21
  "*.cs"
 
22
)
 
23
 
 
24
# remove the file before we begin appending
 
25
file( REMOVE ${OUTPUT_FILE} )
 
26
 
 
27
# begin comment
 
28
file( APPEND ${OUTPUT_FILE} "namespace sitk = itk::simple;/**\n")
 
29
 
 
30
FOREACH( f IN LISTS EXAMPLES_LIST )
 
31
  file( APPEND ${OUTPUT_FILE}  "\\example ${f}\n" )
 
32
ENDFOREACH( )
 
33
 
 
34
# end comment
 
35
file( APPEND ${OUTPUT_FILE}  "*/\n" )