0
12
0
... | ... |
@@ -14,26 +14,28 @@ |
14 | 14 |
IF(MSVC) |
15 | 15 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996") |
16 | 16 |
# Suppressed warnings: |
17 | 17 |
# C4250: 'class1' : inherits 'class2::member' via dominance |
18 | 18 |
# C4355: 'this' : used in base member initializer list |
19 | 19 |
# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) |
20 | 20 |
# C4996: 'function': was declared deprecated |
21 | 21 |
ENDIF(MSVC) |
22 | 22 |
|
23 | 23 |
INCLUDE(FindDoxygen) |
24 | 24 |
INCLUDE(FindGhostscript) |
25 | 25 |
|
26 |
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
|
27 |
|
|
26 | 28 |
INCLUDE(CheckTypeSize) |
27 |
CHECK_TYPE_SIZE("long long" |
|
29 |
CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG) |
|
28 | 30 |
|
29 | 31 |
ENABLE_TESTING() |
30 | 32 |
|
31 | 33 |
ADD_SUBDIRECTORY(lemon) |
32 | 34 |
ADD_SUBDIRECTORY(demo) |
33 | 35 |
ADD_SUBDIRECTORY(doc) |
34 | 36 |
ADD_SUBDIRECTORY(test) |
35 | 37 |
|
36 | 38 |
IF(WIN32) |
37 | 39 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
38 | 40 |
SET(CPACK_PACKAGE_VENDOR "EGRES") |
39 | 41 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
... | ... |
@@ -18,25 +18,25 @@ |
18 | 18 |
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc]) |
19 | 19 |
AC_CONFIG_SRCDIR([lemon/list_graph.h]) |
20 | 20 |
AC_CONFIG_HEADERS([config.h lemon/config.h]) |
21 | 21 |
|
22 | 22 |
lx_cmdline_cxxflags_set=${CXXFLAGS+set} |
23 | 23 |
|
24 | 24 |
dnl Do compilation tests using the C++ compiler. |
25 | 25 |
AC_LANG([C++]) |
26 | 26 |
|
27 | 27 |
dnl Check the existence of long long type. |
28 | 28 |
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) |
29 | 29 |
if test x"$long_long_found" = x"yes"; then |
30 |
AC_DEFINE([ |
|
30 |
AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.]) |
|
31 | 31 |
fi |
32 | 32 |
|
33 | 33 |
dnl Checks for programs. |
34 | 34 |
AC_PROG_CXX |
35 | 35 |
AC_PROG_CXXCPP |
36 | 36 |
AC_PROG_INSTALL |
37 | 37 |
AC_DISABLE_SHARED |
38 | 38 |
AC_PROG_LIBTOOL |
39 | 39 |
|
40 | 40 |
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) |
41 | 41 |
AC_CHECK_PROG([gs_found],[gs],[yes],[no]) |
42 | 42 |
1 |
INCLUDE_DIRECTORIES( |
|
1 |
INCLUDE_DIRECTORIES( |
|
2 |
${CMAKE_SOURCE_DIR} |
|
3 |
${PROJECT_BINARY_DIR} |
|
4 |
) |
|
2 | 5 |
|
3 | 6 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
4 | 7 |
|
5 | 8 |
SET(DEMOS |
6 | 9 |
arg_parser_demo |
7 | 10 |
graph_to_eps_demo |
8 | 11 |
lgf_demo) |
9 | 12 |
|
10 | 13 |
FOREACH(DEMO_NAME ${DEMOS}) |
11 | 14 |
ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc) |
12 | 15 |
TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon) |
13 | 16 |
ENDFOREACH(DEMO_NAME) |
1 |
INCLUDE_DIRECTORIES( |
|
1 |
INCLUDE_DIRECTORIES( |
|
2 |
${CMAKE_SOURCE_DIR} |
|
3 |
${PROJECT_BINARY_DIR} |
|
4 |
) |
|
5 |
|
|
6 |
CONFIGURE_FILE( |
|
7 |
${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake |
|
8 |
${CMAKE_CURRENT_BINARY_DIR}/config.h |
|
9 |
) |
|
2 | 10 |
|
3 | 11 |
ADD_LIBRARY(lemon |
4 | 12 |
arg_parser.cc |
5 | 13 |
base.cc |
6 | 14 |
color.cc |
7 | 15 |
random.cc |
8 | 16 |
bits/windows.cc |
9 | 17 |
) |
10 | 18 |
|
11 | 19 |
INSTALL( |
12 | 20 |
TARGETS lemon |
13 | 21 |
ARCHIVE DESTINATION lib |
14 | 22 |
COMPONENT library) |
15 | 23 |
|
16 | 24 |
INSTALL( |
17 | 25 |
DIRECTORY . bits concepts |
18 | 26 |
DESTINATION include/lemon |
19 | 27 |
COMPONENT headers |
20 | 28 |
FILES_MATCHING PATTERN "*.h") |
29 |
|
|
30 |
INSTALL( |
|
31 |
FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h |
|
32 |
DESTINATION include/lemon |
|
33 |
COMPONENT headers) |
... | ... |
@@ -14,24 +14,25 @@ |
14 | 14 |
lemon/bits/windows.cc |
15 | 15 |
|
16 | 16 |
#lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS) |
17 | 17 |
#lemon_libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS) $(SOPLEX_LIBS) |
18 | 18 |
|
19 | 19 |
lemon_HEADERS += \ |
20 | 20 |
lemon/arg_parser.h \ |
21 | 21 |
lemon/assert.h \ |
22 | 22 |
lemon/bfs.h \ |
23 | 23 |
lemon/bin_heap.h \ |
24 | 24 |
lemon/color.h \ |
25 | 25 |
lemon/concept_check.h \ |
26 |
lemon/config.h \ |
|
26 | 27 |
lemon/counter.h \ |
27 | 28 |
lemon/core.h \ |
28 | 29 |
lemon/dfs.h \ |
29 | 30 |
lemon/dijkstra.h \ |
30 | 31 |
lemon/dim2.h \ |
31 | 32 |
lemon/error.h \ |
32 | 33 |
lemon/graph_to_eps.h \ |
33 | 34 |
lemon/kruskal.h \ |
34 | 35 |
lemon/lgf_reader.h \ |
35 | 36 |
lemon/lgf_writer.h \ |
36 | 37 |
lemon/list_graph.h \ |
37 | 38 |
lemon/maps.h \ |
... | ... |
@@ -88,25 +88,25 @@ |
88 | 88 |
// long |
89 | 89 |
template <typename _Graph, typename _Item> |
90 | 90 |
struct DefaultMapSelector<_Graph, _Item, signed long> { |
91 | 91 |
typedef VectorMap<_Graph, _Item, signed long> Map; |
92 | 92 |
}; |
93 | 93 |
|
94 | 94 |
template <typename _Graph, typename _Item> |
95 | 95 |
struct DefaultMapSelector<_Graph, _Item, unsigned long> { |
96 | 96 |
typedef VectorMap<_Graph, _Item, unsigned long> Map; |
97 | 97 |
}; |
98 | 98 |
|
99 | 99 |
|
100 |
#if defined |
|
100 |
#if defined LEMON_HAVE_LONG_LONG |
|
101 | 101 |
|
102 | 102 |
// long long |
103 | 103 |
template <typename _Graph, typename _Item> |
104 | 104 |
struct DefaultMapSelector<_Graph, _Item, signed long long> { |
105 | 105 |
typedef VectorMap<_Graph, _Item, signed long long> Map; |
106 | 106 |
}; |
107 | 107 |
|
108 | 108 |
template <typename _Graph, typename _Item> |
109 | 109 |
struct DefaultMapSelector<_Graph, _Item, unsigned long long> { |
110 | 110 |
typedef VectorMap<_Graph, _Item, unsigned long long> Map; |
111 | 111 |
}; |
112 | 112 |
... | ... |
@@ -52,25 +52,25 @@ |
52 | 52 |
return 0; |
53 | 53 |
}' |
54 | 54 |
|
55 | 55 |
AC_LANG_PUSH(C++) |
56 | 56 |
AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no]) |
57 | 57 |
AC_LANG_POP(C++) |
58 | 58 |
|
59 | 59 |
CXXFLAGS="$lx_save_cxxflags" |
60 | 60 |
LDFLAGS="$lx_save_ldflags" |
61 | 61 |
LIBS="$lx_save_libs" |
62 | 62 |
|
63 | 63 |
if test x"$lx_cplex_found" = x"yes"; then |
64 |
AC_DEFINE([ |
|
64 |
AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.]) |
|
65 | 65 |
AC_MSG_RESULT([yes]) |
66 | 66 |
else |
67 | 67 |
CPLEX_CFLAGS="" |
68 | 68 |
CPLEX_LDFLAGS="" |
69 | 69 |
CPLEX_LIBS="" |
70 | 70 |
AC_MSG_RESULT([no]) |
71 | 71 |
fi |
72 | 72 |
fi |
73 | 73 |
CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS" |
74 | 74 |
AC_SUBST(CPLEX_CFLAGS) |
75 | 75 |
AC_SUBST(CPLEX_LIBS) |
76 | 76 |
AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"]) |
... | ... |
@@ -50,25 +50,25 @@ |
50 | 50 |
return 0; |
51 | 51 |
}' |
52 | 52 |
|
53 | 53 |
AC_LANG_PUSH(C++) |
54 | 54 |
AC_LINK_IFELSE([$lx_glpk_test_prog], [lx_glpk_found=yes], [lx_glpk_found=no]) |
55 | 55 |
AC_LANG_POP(C++) |
56 | 56 |
|
57 | 57 |
CXXFLAGS="$lx_save_cxxflags" |
58 | 58 |
LDFLAGS="$lx_save_ldflags" |
59 | 59 |
LIBS="$lx_save_libs" |
60 | 60 |
|
61 | 61 |
if test x"$lx_glpk_found" = x"yes"; then |
62 |
AC_DEFINE([ |
|
62 |
AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.]) |
|
63 | 63 |
AC_MSG_RESULT([yes]) |
64 | 64 |
else |
65 | 65 |
GLPK_CFLAGS="" |
66 | 66 |
GLPK_LDFLAGS="" |
67 | 67 |
GLPK_LIBS="" |
68 | 68 |
AC_MSG_RESULT([no]) |
69 | 69 |
fi |
70 | 70 |
fi |
71 | 71 |
GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS" |
72 | 72 |
AC_SUBST(GLPK_CFLAGS) |
73 | 73 |
AC_SUBST(GLPK_LIBS) |
74 | 74 |
AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"]) |
... | ... |
@@ -46,25 +46,25 @@ |
46 | 46 |
return 0; |
47 | 47 |
}' |
48 | 48 |
|
49 | 49 |
AC_LANG_PUSH(C++) |
50 | 50 |
AC_LINK_IFELSE([$lx_soplex_test_prog], [lx_soplex_found=yes], [lx_soplex_found=no]) |
51 | 51 |
AC_LANG_POP(C++) |
52 | 52 |
|
53 | 53 |
CXXFLAGS="$lx_save_cxxflags" |
54 | 54 |
LDFLAGS="$lx_save_ldflags" |
55 | 55 |
LIBS="$lx_save_libs" |
56 | 56 |
|
57 | 57 |
if test x"$lx_soplex_found" = x"yes"; then |
58 |
AC_DEFINE([ |
|
58 |
AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.]) |
|
59 | 59 |
AC_MSG_RESULT([yes]) |
60 | 60 |
else |
61 | 61 |
SOPLEX_CXXFLAGS="" |
62 | 62 |
SOPLEX_LDFLAGS="" |
63 | 63 |
SOPLEX_LIBS="" |
64 | 64 |
AC_MSG_RESULT([no]) |
65 | 65 |
fi |
66 | 66 |
fi |
67 | 67 |
SOPLEX_LIBS="$SOPLEX_LDFLAGS $SOPLEX_LIBS" |
68 | 68 |
AC_SUBST(SOPLEX_CXXFLAGS) |
69 | 69 |
AC_SUBST(SOPLEX_LIBS) |
70 | 70 |
AM_CONDITIONAL([HAVE_SOPLEX], [test x"$lx_soplex_found" = x"yes"]) |
1 |
INCLUDE_DIRECTORIES( |
|
1 |
INCLUDE_DIRECTORIES( |
|
2 |
${CMAKE_SOURCE_DIR} |
|
3 |
${PROJECT_BINARY_DIR} |
|
4 |
) |
|
2 | 5 |
|
3 | 6 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
4 | 7 |
|
5 | 8 |
SET(TESTS |
6 | 9 |
bfs_test |
7 | 10 |
counter_test |
8 | 11 |
dfs_test |
9 | 12 |
digraph_test |
10 | 13 |
dijkstra_test |
11 | 14 |
dim_test |
12 | 15 |
error_test |
13 | 16 |
graph_copy_test |
0 comments (0 inline)