0
5
4
bin
bin
bin
bin
101
5
5
4
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) |
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) |
1 |
project (LEMON) |
|
2 |
enable_testing () |
|
3 |
add_subdirectory (lemon) |
|
4 |
add_subdirectory (demo) |
|
5 |
|
|
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) |
... | ... |
@@ -3,13 +3,13 @@ |
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([ |
|
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 |
|
... | ... |
@@ -22,48 +22,49 @@ |
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 |
1 |
|
|
1 |
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) |
|
2 | 2 |
|
3 |
|
|
3 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
|
4 | 4 |
|
5 |
|
|
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) |
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") |
1 |
|
|
1 |
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) |
|
2 | 2 |
|
3 |
|
|
3 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
|
4 | 4 |
|
5 |
|
|
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 |
... | ... |
@@ -13,16 +13,16 @@ |
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 |
|
|
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) |
0 comments (0 inline)