gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge
0 7 4
merge default
2 files changed with 210 insertions and 41 deletions:
↑ Collapse diff ↑
Ignore white space 6442450944 line context
1
INCLUDE(FindPackageHandleStandardArgs)
2

	
3
FIND_PROGRAM(GHOSTSCRIPT_EXECUTABLE
4
  NAMES gs gswin32c
5
  PATHS "$ENV{ProgramFiles}/gs"
6
  PATH_SUFFIXES gs8.61/bin gs8.62/bin
7
  DOC "Ghostscript: PostScript and PDF language interpreter and previewer."
8
)
9

	
10
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ghostscript DEFAULT_MSG GHOSTSCRIPT_EXECUTABLE)
Ignore white space 6442450944 line context
new binary file 100644
Ignore white space 6442450944 line context
new binary file 100644
Ignore white space 6442450944 line context
1
SET(PACKAGE_NAME ${PROJECT_NAME})
2
SET(PACKAGE_VERSION ${PROJECT_VERSION})
3
SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
4
SET(abs_top_builddir ${CMAKE_BINARY_DIR})
5

	
6
CONFIGURE_FILE(
7
  ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
8
  ${CMAKE_BINARY_DIR}/doc/Doxyfile
9
  @ONLY)
10

	
11
IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
12
  IF(UNIX)
13
    ADD_CUSTOM_TARGET(html
14
      COMMAND rm -rf gen-images
15
      COMMAND mkdir gen-images
16
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
17
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
18
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
19
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
20
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
21
      COMMAND rm -rf html
22
      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
23
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
24
  ELSEIF(WIN32)
25
    ADD_CUSTOM_TARGET(html
26
      COMMAND if exist gen-images rmdir /s /q gen-images
27
      COMMAND mkdir gen-images
28
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
29
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
30
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
31
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
32
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
33
      COMMAND if exist html rmdir /s /q html
34
      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
35
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
36
  ENDIF(UNIX)
37
ENDIF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
38

	
39
INSTALL(
40
  DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
41
  DESTINATION doc
42
  COMPONENT html_documentation)
Ignore white space 6442450944 line context
1
project (LEMON)
2
enable_testing ()
3
add_subdirectory (lemon)
4
add_subdirectory (demo)
5
add_subdirectory (test)
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2

	
3
#EXECUTE_PROCESS(
4
#  COMMAND hg id -i
5
#  OUTPUT_VARIABLE HG_REVISION
6
#  OUTPUT_STRIP_TRAILING_WHITESPACE)
7

	
8
SET(PROJECT_NAME "Lemon")
9
SET(PROJECT_VERSION_MAJOR "0")
10
SET(PROJECT_VERSION_MINOR "99")
11
SET(PROJECT_VERSION_PATCH "0")
12
SET(PROJECT_VERSION
13
  "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
14

	
15
PROJECT(${PROJECT_NAME})
16

	
17
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
18

	
19
INCLUDE(FindDoxygen)
20
INCLUDE(FindGhostscript)
21

	
22
ENABLE_TESTING()
23

	
24
ADD_SUBDIRECTORY(lemon)
25
ADD_SUBDIRECTORY(demo)
26
ADD_SUBDIRECTORY(doc)
27
ADD_SUBDIRECTORY(test)
28

	
29
IF(WIN32)
30
  INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico
31
    DESTINATION bin)
32
ENDIF(WIN32)
33

	
34
IF(WIN32)
35
  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
36
  SET(CPACK_PACKAGE_VENDOR
37
    "EGRES - Egervary Research Group on Combinatorial Optimization")
38
  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
39
    "Lemon - Library of Efficient Models and Optimization in Networks")
40
  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
41

	
42
  SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
43
  SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
44
  SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
45
  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
46

	
47
  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
48
    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
49
  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
50
    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
51

	
52
  # Variables to generate a component-based installer.
53
  #SET(CPACK_COMPONENTS_ALL headers library html_documentation)
54

	
55
  #SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
56
  #SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Static library")
57
  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
58

	
59
  #SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
60
  #  "C++ header files for use with the Lemon library")
61
  #SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
62
  #  "Static library used to build programs with Lemon")
63
  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
64
  #  "Doxygen generated documentation")
65

	
66
  #SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
67

	
68
  #SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
69
  #SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
70
  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
71

	
72
  #SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
73
  #  "Components needed to develop software using Lemon")
74
  #SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
75
  #  "Documentation of Lemon")
76

	
77
  #SET(CPACK_ALL_INSTALL_TYPES Full Developer)
78

	
79
  #SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
80
  #SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
81
  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
82

	
83
  SET(CPACK_GENERATOR "NSIS")
84
  SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
85
  SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
86
  #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
87
  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
88
  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
89
  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
90
  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
91
  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
92
  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
93
    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\index.html\\\"
94
    ")
95
  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
96
    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
97
    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
98
    ")
99

	
100
  INCLUDE(CPack)
101
ENDIF(WIN32)
Ignore white space 6442450944 line context
1 1
dnl Process this file with autoconf to produce a configure script.
2 2

	
3 3
dnl Version information.
4 4
m4_define([lemon_version_number], [])
5 5
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
6 6
m4_define([lemon_version], [ifelse(lemon_version_number(), [], [lemon_hg_revision()], [lemon_version_number()])])
7 7

	
8 8
AC_PREREQ([2.59])
9
AC_INIT([LEMON], [lemon_version()], [lemon-devel@lemon.cs.elte.hu], [lemon])
9
AC_INIT([Lemon], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
10 10
AC_CONFIG_AUX_DIR([build-aux])
11 11
AC_CONFIG_MACRO_DIR([m4])
12 12
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
13 13
AC_CONFIG_SRCDIR([lemon/list_graph.h])
14 14
AC_CONFIG_HEADERS([config.h lemon/config.h])
15 15

	
16 16
lx_cmdline_cxxflags_set=${CXXFLAGS+set}
17 17

	
18 18
dnl Checks for programs.
19 19
AC_PROG_CXX
20 20
AC_PROG_CXXCPP
21 21
AC_PROG_INSTALL
22 22
AC_DISABLE_SHARED
23 23
AC_PROG_LIBTOOL
24 24

	
25 25
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
26 26
AC_CHECK_PROG([gs_found],[gs],[yes],[no])
27 27

	
28
dnl Set custom compiler flags when using g++.
28 29
if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
29 30
  CXXFLAGS="$CXXFLAGS -Wall -W -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 -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
30 31
fi
31 32

	
32 33
dnl Checks for libraries.
33 34
LX_CHECK_GLPK
34 35
LX_CHECK_CPLEX
35 36
LX_CHECK_SOPLEX
36 37

	
37
dnl Disable/enable building the demo programs
38
dnl Disable/enable building the demo programs.
38 39
AC_ARG_ENABLE([demo],
39 40
AS_HELP_STRING([--enable-demo], [build the demo programs])
40 41
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
41 42
              [], [enable_demo=no])
42 43
AC_MSG_CHECKING([whether to build the demo programs])
43 44
if test x"$enable_demo" != x"no"; then
44 45
  AC_MSG_RESULT([yes])
45 46
else
46 47
  AC_MSG_RESULT([no])
47 48
fi
48 49
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
49 50

	
50
dnl Disable/enable building the binary tools
51
dnl Disable/enable building the binary tools.
51 52
AC_ARG_ENABLE([tools],
52 53
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
53 54
AS_HELP_STRING([--disable-tools], [do not build additional tools]),
54 55
              [], [enable_tools=yes])
55 56
AC_MSG_CHECKING([whether to build the additional tools])
56 57
if test x"$enable_tools" != x"no"; then
57 58
  AC_MSG_RESULT([yes])
58 59
else
59 60
  AC_MSG_RESULT([no])
60 61
fi
61 62
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
62 63

	
63
dnl Disable/enable building the benchmarks
64
dnl Disable/enable building the benchmarks.
64 65
AC_ARG_ENABLE([benchmark],
65 66
AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
66 67
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
67 68
              [], [enable_benchmark=no])
68 69
AC_MSG_CHECKING([whether to build the benchmarks])
69 70
if test x"$enable_benchmark" != x"no"; then
70 71
  AC_MSG_RESULT([yes])
71 72
else
72 73
  AC_MSG_RESULT([no])
73 74
fi
74 75
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
75 76

	
76 77
dnl Checks for header files.
77 78
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
78 79

	
79 80
dnl Checks for typedefs, structures, and compiler characteristics.
80 81
AC_C_CONST
81 82
AC_C_INLINE
82 83
AC_TYPE_SIZE_T
83 84
AC_HEADER_TIME
84 85
AC_STRUCT_TM
85 86

	
86 87
dnl Checks for library functions.
87 88
AC_HEADER_STDC
88 89
AC_CHECK_FUNCS(gettimeofday times ctime_r)
89 90

	
90 91
dnl Add dependencies on files generated by configure.
91 92
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
92 93
  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in'])
93 94

	
94 95
AC_CONFIG_FILES([
95 96
Makefile
96 97
doc/Doxyfile
97 98
lemon/lemon.pc
98 99
])
99 100

	
100 101
AC_OUTPUT
101 102

	
102 103
echo
103 104
echo '****************************** SUMMARY ******************************'
104 105
echo
105 106
echo Package version............... : $PACKAGE-$VERSION
106 107
echo
107 108
echo C++ compiler.................. : $CXX
108 109
echo C++ compiles flags............ : $CXXFLAGS
109 110
echo
110 111
echo GLPK support.................. : $lx_glpk_found
111 112
echo CPLEX support................. : $lx_cplex_found
112 113
echo SOPLEX support................ : $lx_soplex_found
113 114
echo
114 115
echo Build benchmarks.............. : $enable_benchmark
115 116
echo Build demo programs........... : $enable_demo
116 117
echo Build additional tools........ : $enable_tools
117 118
echo
118 119
echo The packace will be installed in
119 120
echo -n '  '
120 121
echo $prefix.
121 122
echo
122 123
echo '*********************************************************************'
123 124

	
124 125
echo
125 126
echo Configure complete, now type \'make\' and then \'make install\'.
126 127
echo
Ignore white space 6442450944 line context
1
include_directories (${LEMON_SOURCE_DIR})
1
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
2 2

	
3
link_directories (${LEMON_BINARY_DIR}/lemon)
3
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
4 4

	
5
set (DEMOS
5
SET(DEMOS
6 6
  arg_parser_demo
7 7
  graph_to_eps_demo
8 8
  lgf_demo)
9 9

	
10
foreach (DEMO_NAME ${DEMOS})
11
  add_executable (${DEMO_NAME} ${DEMO_NAME}.cc)
12
  target_link_libraries (${DEMO_NAME} lemon)
13
  endforeach (DEMO_NAME)
10
FOREACH(DEMO_NAME ${DEMOS})
11
  ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc)
12
  TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon)
13
ENDFOREACH(DEMO_NAME)
Ignore white space 6442450944 line context
1 1
# Doxyfile 1.5.5
2 2

	
3 3
#---------------------------------------------------------------------------
4 4
# Project related configuration options
5 5
#---------------------------------------------------------------------------
6 6
DOXYFILE_ENCODING      = UTF-8
7 7
PROJECT_NAME           = @PACKAGE_NAME@
8 8
PROJECT_NUMBER         = @PACKAGE_VERSION@
9 9
OUTPUT_DIRECTORY       = 
10 10
CREATE_SUBDIRS         = NO
11 11
OUTPUT_LANGUAGE        = English
12 12
BRIEF_MEMBER_DESC      = YES
13 13
REPEAT_BRIEF           = NO
14 14
ABBREVIATE_BRIEF       = 
15 15
ALWAYS_DETAILED_SEC    = NO
16 16
INLINE_INHERITED_MEMB  = NO
17 17
FULL_PATH_NAMES        = YES
18
STRIP_FROM_PATH        = @abs_top_srcdir@
19
STRIP_FROM_INC_PATH    = @abs_top_srcdir@
18
STRIP_FROM_PATH        = "@abs_top_srcdir@"
19
STRIP_FROM_INC_PATH    = "@abs_top_srcdir@"
20 20
SHORT_NAMES            = YES
21 21
JAVADOC_AUTOBRIEF      = NO
22 22
QT_AUTOBRIEF           = NO
23 23
MULTILINE_CPP_IS_BRIEF = NO
24 24
DETAILS_AT_TOP         = YES
25 25
INHERIT_DOCS           = NO
26 26
SEPARATE_MEMBER_PAGES  = NO
27 27
TAB_SIZE               = 8
28 28
ALIASES                = 
29 29
OPTIMIZE_OUTPUT_FOR_C  = NO
30 30
OPTIMIZE_OUTPUT_JAVA   = NO
31 31
OPTIMIZE_FOR_FORTRAN   = NO
32 32
OPTIMIZE_OUTPUT_VHDL   = NO
33 33
BUILTIN_STL_SUPPORT    = YES
34 34
CPP_CLI_SUPPORT        = NO
35 35
SIP_SUPPORT            = NO
36 36
DISTRIBUTE_GROUP_DOC   = NO
37 37
SUBGROUPING            = YES
38 38
TYPEDEF_HIDES_STRUCT   = NO
39 39
#---------------------------------------------------------------------------
40 40
# Build related configuration options
41 41
#---------------------------------------------------------------------------
42 42
EXTRACT_ALL            = NO
43 43
EXTRACT_PRIVATE        = YES
44 44
EXTRACT_STATIC         = YES
45 45
EXTRACT_LOCAL_CLASSES  = NO
46 46
EXTRACT_LOCAL_METHODS  = NO
47 47
EXTRACT_ANON_NSPACES   = NO
48 48
HIDE_UNDOC_MEMBERS     = YES
49 49
HIDE_UNDOC_CLASSES     = YES
50 50
HIDE_FRIEND_COMPOUNDS  = NO
51 51
HIDE_IN_BODY_DOCS      = NO
52 52
INTERNAL_DOCS          = NO
53 53
CASE_SENSE_NAMES       = YES
54 54
HIDE_SCOPE_NAMES       = YES
55 55
SHOW_INCLUDE_FILES     = YES
56 56
INLINE_INFO            = YES
57 57
SORT_MEMBER_DOCS       = NO
58 58
SORT_BRIEF_DOCS        = NO
59 59
SORT_GROUP_NAMES       = NO
60 60
SORT_BY_SCOPE_NAME     = NO
61 61
GENERATE_TODOLIST      = YES
62 62
GENERATE_TESTLIST      = YES
63 63
GENERATE_BUGLIST       = YES
64 64
GENERATE_DEPRECATEDLIST= YES
65 65
ENABLED_SECTIONS       = 
66 66
MAX_INITIALIZER_LINES  = 5
67 67
SHOW_USED_FILES        = YES
68 68
SHOW_DIRECTORIES       = YES
69 69
FILE_VERSION_FILTER    = 
70 70
#---------------------------------------------------------------------------
71 71
# configuration options related to warning and progress messages
72 72
#---------------------------------------------------------------------------
73 73
QUIET                  = NO
74 74
WARNINGS               = YES
75 75
WARN_IF_UNDOCUMENTED   = YES
76 76
WARN_IF_DOC_ERROR      = YES
77 77
WARN_NO_PARAMDOC       = NO
78 78
WARN_FORMAT            = "$file:$line: $text  "
79 79
WARN_LOGFILE           = doxygen.log
80 80
#---------------------------------------------------------------------------
81 81
# configuration options related to the input files
82 82
#---------------------------------------------------------------------------
83
INPUT                  = @abs_top_srcdir@/doc \
84
                         @abs_top_srcdir@/lemon \
85
                         @abs_top_srcdir@/lemon/bits \
86
                         @abs_top_srcdir@/lemon/concepts \
87
                         @abs_top_srcdir@/demo \
88
                         @abs_top_srcdir@/tools \
89
                         @abs_top_srcdir@/test/test_tools.h
83
INPUT                  = "@abs_top_srcdir@/doc" \
84
                         "@abs_top_srcdir@/lemon" \
85
                         "@abs_top_srcdir@/lemon/bits" \
86
                         "@abs_top_srcdir@/lemon/concepts" \
87
                         "@abs_top_srcdir@/demo" \
88
                         "@abs_top_srcdir@/tools" \
89
                         "@abs_top_srcdir@/test/test_tools.h"
90 90
INPUT_ENCODING         = UTF-8
91 91
FILE_PATTERNS          = *.h \
92 92
                         *.cc \
93 93
                         *.dox
94 94
RECURSIVE              = NO
95 95
EXCLUDE                = 
96 96
EXCLUDE_SYMLINKS       = NO
97 97
EXCLUDE_PATTERNS       = 
98 98
EXCLUDE_SYMBOLS        = 
99
EXAMPLE_PATH           = @abs_top_srcdir@/demo \
100
                         @abs_top_srcdir@/LICENSE \
101
                         @abs_top_srcdir@/doc
99
EXAMPLE_PATH           = "@abs_top_srcdir@/demo" \
100
                         "@abs_top_srcdir@/LICENSE" \
101
                         "@abs_top_srcdir@/doc"
102 102
EXAMPLE_PATTERNS       = 
103 103
EXAMPLE_RECURSIVE      = NO
104
IMAGE_PATH             = @abs_top_srcdir@/doc/images \
105
                         @abs_top_builddir@/doc/gen-images
104
IMAGE_PATH             = "@abs_top_srcdir@/doc/images" \
105
                         "@abs_top_builddir@/doc/gen-images"
106 106
INPUT_FILTER           = 
107 107
FILTER_PATTERNS        = 
108 108
FILTER_SOURCE_FILES    = NO
109 109
#---------------------------------------------------------------------------
110 110
# configuration options related to source browsing
111 111
#---------------------------------------------------------------------------
112 112
SOURCE_BROWSER         = NO
113 113
INLINE_SOURCES         = NO
114 114
STRIP_CODE_COMMENTS    = YES
115 115
REFERENCED_BY_RELATION = NO
116 116
REFERENCES_RELATION    = NO
117 117
REFERENCES_LINK_SOURCE = YES
118 118
USE_HTAGS              = NO
119 119
VERBATIM_HEADERS       = NO
120 120
#---------------------------------------------------------------------------
121 121
# configuration options related to the alphabetical class index
122 122
#---------------------------------------------------------------------------
123 123
ALPHABETICAL_INDEX     = YES
124 124
COLS_IN_ALPHA_INDEX    = 2
125 125
IGNORE_PREFIX          = 
126 126
#---------------------------------------------------------------------------
127 127
# configuration options related to the HTML output
128 128
#---------------------------------------------------------------------------
129 129
GENERATE_HTML          = YES
130 130
HTML_OUTPUT            = html
131 131
HTML_FILE_EXTENSION    = .html
132 132
HTML_HEADER            = 
133 133
HTML_FOOTER            = 
134 134
HTML_STYLESHEET        = 
135 135
HTML_ALIGN_MEMBERS     = YES
136 136
GENERATE_HTMLHELP      = NO
137 137
GENERATE_DOCSET        = NO
138 138
DOCSET_FEEDNAME        = "Doxygen generated docs"
139 139
DOCSET_BUNDLE_ID       = org.doxygen.Project
140 140
HTML_DYNAMIC_SECTIONS  = NO
141 141
CHM_FILE               = 
142 142
HHC_LOCATION           = 
143 143
GENERATE_CHI           = NO
144 144
BINARY_TOC             = NO
145 145
TOC_EXPAND             = NO
146 146
DISABLE_INDEX          = NO
147 147
ENUM_VALUES_PER_LINE   = 4
148 148
GENERATE_TREEVIEW      = NO
149 149
TREEVIEW_WIDTH         = 250
150 150
#---------------------------------------------------------------------------
151 151
# configuration options related to the LaTeX output
152 152
#---------------------------------------------------------------------------
153 153
GENERATE_LATEX         = NO
154 154
LATEX_OUTPUT           = latex
155 155
LATEX_CMD_NAME         = latex
156 156
MAKEINDEX_CMD_NAME     = makeindex
157 157
COMPACT_LATEX          = YES
158 158
PAPER_TYPE             = a4wide
159 159
EXTRA_PACKAGES         = amsmath \
160 160
                         amssymb
161 161
LATEX_HEADER           = 
162 162
PDF_HYPERLINKS         = YES
163 163
USE_PDFLATEX           = YES
164 164
LATEX_BATCHMODE        = NO
165 165
LATEX_HIDE_INDICES     = NO
166 166
#---------------------------------------------------------------------------
167 167
# configuration options related to the RTF output
168 168
#---------------------------------------------------------------------------
169 169
GENERATE_RTF           = NO
170 170
RTF_OUTPUT             = rtf
171 171
COMPACT_RTF            = NO
172 172
RTF_HYPERLINKS         = NO
173 173
RTF_STYLESHEET_FILE    = 
174 174
RTF_EXTENSIONS_FILE    = 
175 175
#---------------------------------------------------------------------------
176 176
# configuration options related to the man page output
177 177
#---------------------------------------------------------------------------
178 178
GENERATE_MAN           = NO
179 179
MAN_OUTPUT             = man
180 180
MAN_EXTENSION          = .3
181 181
MAN_LINKS              = NO
182 182
#---------------------------------------------------------------------------
183 183
# configuration options related to the XML output
184 184
#---------------------------------------------------------------------------
185 185
GENERATE_XML           = NO
186 186
XML_OUTPUT             = xml
187 187
XML_SCHEMA             = 
188 188
XML_DTD                = 
189 189
XML_PROGRAMLISTING     = YES
190 190
#---------------------------------------------------------------------------
191 191
# configuration options for the AutoGen Definitions output
192 192
#---------------------------------------------------------------------------
193 193
GENERATE_AUTOGEN_DEF   = NO
194 194
#---------------------------------------------------------------------------
195 195
# configuration options related to the Perl module output
196 196
#---------------------------------------------------------------------------
197 197
GENERATE_PERLMOD       = NO
198 198
PERLMOD_LATEX          = NO
199 199
PERLMOD_PRETTY         = YES
200 200
PERLMOD_MAKEVAR_PREFIX = 
201 201
#---------------------------------------------------------------------------
202 202
# Configuration options related to the preprocessor   
203 203
#---------------------------------------------------------------------------
204 204
ENABLE_PREPROCESSING   = YES
205 205
MACRO_EXPANSION        = NO
206 206
EXPAND_ONLY_PREDEF     = NO
207 207
SEARCH_INCLUDES        = YES
208 208
INCLUDE_PATH           = 
209 209
INCLUDE_FILE_PATTERNS  = 
210 210
PREDEFINED             = DOXYGEN
211 211
EXPAND_AS_DEFINED      = 
212 212
SKIP_FUNCTION_MACROS   = YES
213 213
#---------------------------------------------------------------------------
214 214
# Configuration::additions related to external references   
215 215
#---------------------------------------------------------------------------
216 216
TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
217 217
GENERATE_TAGFILE       = html/lemon.tag
218 218
ALLEXTERNALS           = NO
219 219
EXTERNAL_GROUPS        = NO
220 220
PERL_PATH              = /usr/bin/perl
221 221
#---------------------------------------------------------------------------
222 222
# Configuration options related to the dot tool   
223 223
#---------------------------------------------------------------------------
224 224
CLASS_DIAGRAMS         = NO
225 225
MSCGEN_PATH            = 
226 226
HIDE_UNDOC_RELATIONS   = YES
227 227
HAVE_DOT               = YES
228 228
CLASS_GRAPH            = YES
229 229
COLLABORATION_GRAPH    = NO
230 230
GROUP_GRAPHS           = NO
231 231
UML_LOOK               = NO
232 232
TEMPLATE_RELATIONS     = NO
233 233
INCLUDE_GRAPH          = NO
234 234
INCLUDED_BY_GRAPH      = NO
235 235
CALL_GRAPH             = NO
236 236
CALLER_GRAPH           = NO
237 237
GRAPHICAL_HIERARCHY    = NO
238 238
DIRECTORY_GRAPH        = NO
239 239
DOT_IMAGE_FORMAT       = png
240 240
DOT_PATH               = 
241 241
DOTFILE_DIRS           = 
242 242
DOT_GRAPH_MAX_NODES    = 50
243 243
MAX_DOT_GRAPH_DEPTH    = 0
244 244
DOT_TRANSPARENT        = NO
245 245
DOT_MULTI_TARGETS      = NO
246 246
GENERATE_LEGEND        = YES
247 247
DOT_CLEANUP            = YES
248 248
#---------------------------------------------------------------------------
249 249
# Configuration::additions related to the search engine   
250 250
#---------------------------------------------------------------------------
251 251
SEARCHENGINE           = NO
Ignore white space 6442450944 line context
1
include_directories (${LEMON_SOURCE_DIR})
2
add_library (lemon arg_parser.cc base.cc color.cc random.cc)
1
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
2

	
3
ADD_LIBRARY(lemon
4
  arg_parser.cc
5
  base.cc
6
  color.cc
7
  random.cc)
8

	
9
INSTALL(
10
  TARGETS lemon
11
  ARCHIVE DESTINATION lib
12
  COMPONENT library)
13

	
14
INSTALL(
15
  DIRECTORY . bits concepts
16
  DESTINATION include/lemon
17
  COMPONENT headers
18
  FILES_MATCHING PATTERN "*.h")
Ignore white space 6442450944 line context
1
include_directories (${LEMON_SOURCE_DIR})
1
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
2 2

	
3
link_directories (${LEMON_BINARY_DIR}/lemon)
3
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
4 4

	
5
set (TESTS
5
SET(TESTS
6 6
  bfs_test
7 7
  counter_test
8 8
  dfs_test
9 9
  digraph_test
10 10
  dijkstra_test
11 11
  dim_test
12 12
  error_test
13 13
  graph_copy_test
14 14
  graph_test
15 15
  graph_utils_test
16 16
  heap_test
17 17
  kruskal_test
18 18
  maps_test
19
  random_test
19 20
  path_test
20
  random_test
21 21
  time_measure_test
22 22
  unionfind_test)
23 23

	
24
foreach (TEST_NAME ${TESTS})
25
  add_executable (${TEST_NAME} ${TEST_NAME}.cc)
26
  target_link_libraries (${TEST_NAME} lemon)
27
  add_test(${TEST_NAME} ${TEST_NAME})
28
endforeach (TEST_NAME)
24
FOREACH(TEST_NAME ${TESTS})
25
  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
26
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
27
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
28
ENDFOREACH(TEST_NAME)
Ignore white space 6442450944 line context
1 1
/* -*- mode: C++; indent-tabs-mode: nil; -*-
2 2
 *
3 3
 * This file is a part of LEMON, a generic C++ optimization library.
4 4
 *
5 5
 * Copyright (C) 2003-2008
6 6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8 8
 *
9 9
 * Permission to use, modify and distribute this software is granted
10 10
 * provided that this copyright notice appears in all copies. For
11 11
 * precise terms see the accompanying LICENSE file.
12 12
 *
13 13
 * This software is provided "AS IS" with no warranty of any kind,
14 14
 * express or implied, and with no claim as to its suitability for any
15 15
 * purpose.
16 16
 *
17 17
 */
18 18

	
19 19
#include <iostream>
20 20

	
21 21
#include <lemon/error.h>
22 22
#include "test_tools.h"
23 23

	
24 24
using namespace lemon;
25 25

	
26 26
#ifdef LEMON_ENABLE_ASSERTS
27 27
#undef LEMON_ENABLE_ASSERTS
28 28
#endif
29 29

	
30 30
#ifdef LEMON_DISABLE_ASSERTS
31 31
#undef LEMON_DISABLE_ASSERTS
32 32
#endif
33 33

	
34
#ifdef NDEBUG
35
#undef NDEBUG
36
#endif
37

	
34 38
//checking disabled asserts
35 39
#define LEMON_DISABLE_ASSERTS
36 40
#include <lemon/assert.h>
37 41

	
38 42
void no_assertion_text_disable() {
39 43
  LEMON_ASSERT(true, "This is a fault message");
40 44
}
41 45

	
42 46
void assertion_text_disable() {
43 47
  LEMON_ASSERT(false, "This is a fault message");
44 48
}
45 49

	
46 50
void fixme_disable() {
47 51
  LEMON_FIXME("fixme_disable() is fixme!");
48 52
}
49 53

	
50 54
void check_assertion_disable() {
51 55
  no_assertion_text_disable();
52 56
  assertion_text_disable();
53 57
  fixme_disable();
54 58
}
55 59
#undef LEMON_DISABLE_ASSERTS
56 60

	
57 61
//checking custom assert handler
58 62
#define LEMON_ASSERT_CUSTOM
59 63

	
60 64
static int cnt = 0;
61 65
void my_assert_handler(const char*, int, const char*,
62 66
                       const char*, const char*) {
63 67
  ++cnt;
64 68
}
65 69

	
66 70
#define LEMON_CUSTOM_ASSERT_HANDLER my_assert_handler
67 71
#include <lemon/assert.h>
68 72

	
69 73
void no_assertion_text_custom() {
70 74
  LEMON_ASSERT(true, "This is a fault message");
71 75
}
72 76

	
73 77
void assertion_text_custom() {
74 78
  LEMON_ASSERT(false, "This is a fault message");
75 79
}
76 80

	
77 81
void fixme_custom() {
78 82
  LEMON_FIXME("fixme_custom() is fixme!");
79 83
}
80 84

	
81 85
void check_assertion_custom() {
82 86
  no_assertion_text_custom();
83 87
  assertion_text_custom();
84 88
  fixme_custom();
85 89
  check(cnt == 2, "The custom assert handler does not work");
86 90
}
87 91

	
88 92
#undef LEMON_ASSERT_CUSTOM
89 93

	
90 94

	
91 95
int main() {
92 96
  check_assertion_disable();
93 97
  check_assertion_custom();
94 98

	
95 99
  return 0;
96 100
}
0 comments (0 inline)