gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
update-external-tags CMAKE target (#395)
0 3 0
default
3 files changed with 14 insertions and 1 deletions:
↑ Collapse diff ↑
Ignore white space 192 line context
1 1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 2

	
3 3
SET(PROJECT_NAME "LEMON")
4 4
PROJECT(${PROJECT_NAME})
5 5

	
6 6
INCLUDE(FindPythonInterp)
7
INCLUDE(FindWget)
7 8

	
8 9
IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
9 10
  INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
10 11
ELSEIF(DEFINED ENV{LEMON_VERSION})
11 12
  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
12 13
ELSE()
13 14
  EXECUTE_PROCESS(
14 15
    COMMAND ${PYTHON_EXECUTABLE} ./scripts/chg-len.py
15 16
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
16 17
    OUTPUT_VARIABLE HG_REVISION_PATH
17 18
    ERROR_QUIET
18 19
    OUTPUT_STRIP_TRAILING_WHITESPACE
19 20
  )
20 21
  EXECUTE_PROCESS(
21 22
    COMMAND hg id -i
22 23
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
23 24
    OUTPUT_VARIABLE HG_REVISION
24 25
    ERROR_QUIET
25 26
    OUTPUT_STRIP_TRAILING_WHITESPACE
26 27
  )
27 28
  IF(HG_REVISION STREQUAL "")
28 29
    SET(HG_REVISION_ID "hg-tip")
29 30
  ELSE()
30 31
    IF(HG_REVISION_PATH STREQUAL "")
31 32
      SET(HG_REVISION_ID ${HG_REVISION})
32 33
    ELSE()
33 34
      SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION})
34 35
    ENDIF()
35 36
  ENDIF()
36 37
  SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.")
37 38
ENDIF()
38 39

	
39 40
SET(PROJECT_VERSION ${LEMON_VERSION})
40 41

	
41 42
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
42 43

	
43 44
FIND_PACKAGE(Doxygen)
44 45
FIND_PACKAGE(Ghostscript)
45 46
FIND_PACKAGE(GLPK 4.33)
46 47
FIND_PACKAGE(CPLEX)
47 48
FIND_PACKAGE(COIN)
48 49

	
49 50
IF(DEFINED ENV{LEMON_CXX_WARNING})
50 51
  SET(CXX_WARNING $ENV{LEMON_CXX_WARNING})
51 52
ELSE()
52 53
  IF(CMAKE_COMPILER_IS_GNUCXX)
53 54
    SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas")
54 55
    SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb")
55 56
    SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
56 57
  ELSEIF(MSVC)
57 58
    # This part is unnecessary 'casue the same is set by the lemon/core.h.
58 59
    # Still keep it as an example.
59 60
    SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
60 61
    # Suppressed warnings:
61 62
    # C4250: 'class1' : inherits 'class2::member' via dominance
62 63
    # C4355: 'this' : used in base member initializer list
63 64
    # C4503: 'function' : decorated name length exceeded, name was truncated
64 65
    # C4800: 'type' : forcing value to bool 'true' or 'false'
65 66
    #        (performance warning)
66 67
    # C4996: 'function': was declared deprecated
67 68
  ELSE()
68 69
    SET(CXX_WARNING "-Wall -W")
69 70
  ENDIF()
70 71
ENDIF()
71 72
SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
72 73

	
73 74
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
74 75

	
75 76
SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
76 77
    "Flags used by the C++ compiler during maintainer builds."
77 78
    FORCE )
78 79
SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
79 80
    "Flags used by the C compiler during maintainer builds."
80 81
    FORCE )
81 82
SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
82 83
    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
83 84
    "Flags used for linking binaries during maintainer builds."
84 85
    FORCE )
85 86
SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
86 87
    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
87 88
    "Flags used by the shared libraries linker during maintainer builds."
88 89
    FORCE )
89 90
MARK_AS_ADVANCED(
90 91
    CMAKE_CXX_FLAGS_MAINTAINER
91 92
    CMAKE_C_FLAGS_MAINTAINER
92 93
    CMAKE_EXE_LINKER_FLAGS_MAINTAINER
93 94
    CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
94 95

	
95 96
IF(CMAKE_CONFIGURATION_TYPES)
96 97
  LIST(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
97 98
  LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
98 99
  SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
99 100
      "Add the configurations that we need"
100 101
      FORCE)
101 102
 endif()
102 103

	
Ignore white space 192 line context
1 1
SET(PACKAGE_NAME ${PROJECT_NAME})
2 2
SET(PACKAGE_VERSION ${PROJECT_VERSION})
3 3
SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
4 4
SET(abs_top_builddir ${PROJECT_BINARY_DIR})
5 5

	
6 6
SET(LEMON_DOC_SOURCE_BROWSER "NO" CACHE STRING "Include source into the doc (YES/NO).")
7 7

	
8 8
CONFIGURE_FILE(
9 9
  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
10 10
  ${PROJECT_BINARY_DIR}/doc/Doxyfile
11 11
  @ONLY
12 12
)
13 13

	
14 14
IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE)
15 15
  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
16 16
  SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
17 17
  ADD_CUSTOM_TARGET(html
18 18
    COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
19 19
    COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
20 20
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
21 21
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
22 22
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
23 23
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
24 24
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
25 25
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/matching.eps
26 26
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
27 27
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
28 28
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
29 29
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
30 30
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
31 31
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
32 32
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/planar.png ${CMAKE_CURRENT_SOURCE_DIR}/images/planar.eps
33 33
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
34 34
    COMMAND ${CMAKE_COMMAND} -E remove_directory html
35 35
    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox
36 36
    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
37 37
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
38 38
  )
39 39

	
40 40
  SET_TARGET_PROPERTIES(html PROPERTIES PROJECT_LABEL BUILD_DOC)
41 41

	
42 42
  IF(UNIX)
43 43
    INSTALL(
44 44
      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
45 45
      DESTINATION share/doc/lemon/html
46 46
      COMPONENT html_documentation
47 47
    )
48 48
  ELSEIF(WIN32)
49 49
    INSTALL(
50 50
      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
51 51
      DESTINATION doc
52 52
      COMPONENT html_documentation
53 53
    )
54 54
  ENDIF()
55 55

	
56 56
ENDIF()
57

	
58
IF(WGET_FOUND)
59
ADD_CUSTOM_TARGET(update-external-tags
60
  COMMAND ${CMAKE_COMMAND} -E make_directory dl
61
  # COMMAND ${CMAKE_COMMAND} -E copy libstdc++.tag dl
62
  COMMAND ${WGET_EXECUTABLE} wget -P dl -N libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag
63
  COMMAND ${CMAKE_COMMAND} -E rename dl/libstdc++.tag libstdc++.tag
64
  COMMAND ${CMAKE_COMMAND} -E remove dl/libstdc++.tag
65
  COMMAND ${CMAKE_COMMAND} -E remove_directory dl
66
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
67
  )
68
ENDIF()
Ignore white space 192 line context
... ...
@@ -132,135 +132,135 @@
132 132
# configuration options related to the HTML output
133 133
#---------------------------------------------------------------------------
134 134
GENERATE_HTML          = YES
135 135
HTML_OUTPUT            = html
136 136
HTML_FILE_EXTENSION    = .html
137 137
HTML_HEADER            = 
138 138
HTML_FOOTER            = 
139 139
HTML_STYLESHEET        = 
140 140
HTML_ALIGN_MEMBERS     = YES
141 141
HTML_DYNAMIC_SECTIONS  = NO
142 142
GENERATE_DOCSET        = NO
143 143
DOCSET_FEEDNAME        = "Doxygen generated docs"
144 144
DOCSET_BUNDLE_ID       = org.doxygen.Project
145 145
GENERATE_HTMLHELP      = NO
146 146
CHM_FILE               = 
147 147
HHC_LOCATION           = 
148 148
GENERATE_CHI           = NO
149 149
CHM_INDEX_ENCODING     = 
150 150
BINARY_TOC             = NO
151 151
TOC_EXPAND             = NO
152 152
GENERATE_QHP           = NO
153 153
QCH_FILE               = 
154 154
QHP_NAMESPACE          = org.doxygen.Project
155 155
QHP_VIRTUAL_FOLDER     = doc
156 156
QHG_LOCATION           = 
157 157
DISABLE_INDEX          = NO
158 158
ENUM_VALUES_PER_LINE   = 4
159 159
GENERATE_TREEVIEW      = NO
160 160
TREEVIEW_WIDTH         = 250
161 161
FORMULA_FONTSIZE       = 10
162 162
#---------------------------------------------------------------------------
163 163
# configuration options related to the LaTeX output
164 164
#---------------------------------------------------------------------------
165 165
GENERATE_LATEX         = NO
166 166
LATEX_OUTPUT           = latex
167 167
LATEX_CMD_NAME         = latex
168 168
MAKEINDEX_CMD_NAME     = makeindex
169 169
COMPACT_LATEX          = YES
170 170
PAPER_TYPE             = a4wide
171 171
EXTRA_PACKAGES         = amsmath \
172 172
                         amssymb
173 173
LATEX_HEADER           = 
174 174
PDF_HYPERLINKS         = YES
175 175
USE_PDFLATEX           = YES
176 176
LATEX_BATCHMODE        = NO
177 177
LATEX_HIDE_INDICES     = NO
178 178
#---------------------------------------------------------------------------
179 179
# configuration options related to the RTF output
180 180
#---------------------------------------------------------------------------
181 181
GENERATE_RTF           = NO
182 182
RTF_OUTPUT             = rtf
183 183
COMPACT_RTF            = NO
184 184
RTF_HYPERLINKS         = NO
185 185
RTF_STYLESHEET_FILE    = 
186 186
RTF_EXTENSIONS_FILE    = 
187 187
#---------------------------------------------------------------------------
188 188
# configuration options related to the man page output
189 189
#---------------------------------------------------------------------------
190 190
GENERATE_MAN           = NO
191 191
MAN_OUTPUT             = man
192 192
MAN_EXTENSION          = .3
193 193
MAN_LINKS              = NO
194 194
#---------------------------------------------------------------------------
195 195
# configuration options related to the XML output
196 196
#---------------------------------------------------------------------------
197 197
GENERATE_XML           = NO
198 198
XML_OUTPUT             = xml
199 199
XML_SCHEMA             = 
200 200
XML_DTD                = 
201 201
XML_PROGRAMLISTING     = YES
202 202
#---------------------------------------------------------------------------
203 203
# configuration options for the AutoGen Definitions output
204 204
#---------------------------------------------------------------------------
205 205
GENERATE_AUTOGEN_DEF   = NO
206 206
#---------------------------------------------------------------------------
207 207
# configuration options related to the Perl module output
208 208
#---------------------------------------------------------------------------
209 209
GENERATE_PERLMOD       = NO
210 210
PERLMOD_LATEX          = NO
211 211
PERLMOD_PRETTY         = YES
212 212
PERLMOD_MAKEVAR_PREFIX = 
213 213
#---------------------------------------------------------------------------
214 214
# Configuration options related to the preprocessor   
215 215
#---------------------------------------------------------------------------
216 216
ENABLE_PREPROCESSING   = YES
217 217
MACRO_EXPANSION        = NO
218 218
EXPAND_ONLY_PREDEF     = NO
219 219
SEARCH_INCLUDES        = YES
220 220
INCLUDE_PATH           = 
221 221
INCLUDE_FILE_PATTERNS  = 
222 222
PREDEFINED             = DOXYGEN
223 223
EXPAND_AS_DEFINED      = 
224 224
SKIP_FUNCTION_MACROS   = YES
225 225
#---------------------------------------------------------------------------
226 226
# Options related to the search engine   
227 227
#---------------------------------------------------------------------------
228
TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
228
TAGFILES               = "@abs_top_builddir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
229 229
GENERATE_TAGFILE       = html/lemon.tag
230 230
ALLEXTERNALS           = NO
231 231
EXTERNAL_GROUPS        = NO
232 232
PERL_PATH              = /usr/bin/perl
233 233
#---------------------------------------------------------------------------
234 234
# Configuration options related to the dot tool   
235 235
#---------------------------------------------------------------------------
236 236
CLASS_DIAGRAMS         = YES
237 237
MSCGEN_PATH            = 
238 238
HIDE_UNDOC_RELATIONS   = YES
239 239
HAVE_DOT               = YES
240 240
DOT_FONTNAME           = FreeSans
241 241
DOT_FONTSIZE           = 10
242 242
DOT_FONTPATH           = 
243 243
CLASS_GRAPH            = YES
244 244
COLLABORATION_GRAPH    = NO
245 245
GROUP_GRAPHS           = NO
246 246
UML_LOOK               = NO
247 247
TEMPLATE_RELATIONS     = NO
248 248
INCLUDE_GRAPH          = NO
249 249
INCLUDED_BY_GRAPH      = NO
250 250
CALL_GRAPH             = NO
251 251
CALLER_GRAPH           = NO
252 252
GRAPHICAL_HIERARCHY    = NO
253 253
DIRECTORY_GRAPH        = NO
254 254
DOT_IMAGE_FORMAT       = png
255 255
DOT_PATH               = 
256 256
DOTFILE_DIRS           = 
257 257
DOT_GRAPH_MAX_NODES    = 50
258 258
MAX_DOT_GRAPH_DEPTH    = 0
259 259
DOT_TRANSPARENT        = NO
260 260
DOT_MULTI_TARGETS      = NO
261 261
GENERATE_LEGEND        = YES
262 262
DOT_CLEANUP            = YES
263 263
#---------------------------------------------------------------------------
264 264
# Configuration::additions related to the search engine   
265 265
#---------------------------------------------------------------------------
266 266
SEARCHENGINE           = NO
0 comments (0 inline)