0
5
1
1 | 1 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
2 | 2 |
|
3 | 3 |
IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
4 | 4 |
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
5 | 5 |
ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
6 | 6 |
SET(PROJECT_NAME "LEMON") |
7 | 7 |
SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.") |
8 | 8 |
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
9 | 9 |
|
10 | 10 |
PROJECT(${PROJECT_NAME}) |
11 | 11 |
|
12 | 12 |
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
13 | 13 |
|
14 | 14 |
INCLUDE(FindDoxygen) |
15 | 15 |
INCLUDE(FindGhostscript) |
16 | 16 |
|
17 |
INCLUDE(CheckTypeSize) |
|
18 |
CHECK_TYPE_SIZE("long long" LONG_LONG) |
|
19 |
|
|
17 | 20 |
ENABLE_TESTING() |
18 | 21 |
|
19 | 22 |
ADD_SUBDIRECTORY(lemon) |
20 | 23 |
ADD_SUBDIRECTORY(demo) |
21 | 24 |
ADD_SUBDIRECTORY(doc) |
22 | 25 |
ADD_SUBDIRECTORY(test) |
23 | 26 |
|
24 | 27 |
IF(WIN32) |
25 | 28 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
26 | 29 |
SET(CPACK_PACKAGE_VENDOR "EGRES") |
27 | 30 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
28 | 31 |
"LEMON - Library of Efficient Models and Optimization in Networks") |
29 | 32 |
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") |
30 | 33 |
|
31 | 34 |
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
32 | 35 |
... | ... |
@@ -11,32 +11,38 @@ |
11 | 11 |
[lemon_hg_path().lemon_hg_revision()], |
12 | 12 |
[lemon_version_number()])]) |
13 | 13 |
|
14 | 14 |
AC_PREREQ([2.59]) |
15 | 15 |
AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) |
16 | 16 |
AC_CONFIG_AUX_DIR([build-aux]) |
17 | 17 |
AC_CONFIG_MACRO_DIR([m4]) |
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 |
dnl Check the existence of long long type. |
|
28 |
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) |
|
29 |
if test x"$long_long_found" = x"yes"; then |
|
30 |
AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.]) |
|
31 |
fi |
|
32 |
|
|
27 | 33 |
dnl Checks for programs. |
28 | 34 |
AC_PROG_CXX |
29 | 35 |
AC_PROG_CXXCPP |
30 | 36 |
AC_PROG_INSTALL |
31 | 37 |
AC_DISABLE_SHARED |
32 | 38 |
AC_PROG_LIBTOOL |
33 | 39 |
|
34 | 40 |
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) |
35 | 41 |
AC_CHECK_PROG([gs_found],[gs],[yes],[no]) |
36 | 42 |
|
37 | 43 |
dnl Detect Intel compiler. |
38 | 44 |
AC_MSG_CHECKING([whether we are using the Intel C++ compiler]) |
39 | 45 |
AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER |
40 | 46 |
choke me |
41 | 47 |
#endif], [ICC=[yes]], [ICC=[no]]) |
42 | 48 |
if test x"$ICC" = x"yes"; then |
... | ... |
@@ -103,32 +109,34 @@ |
103 | 109 |
Makefile |
104 | 110 |
cmake/version.cmake |
105 | 111 |
doc/Doxyfile |
106 | 112 |
lemon/lemon.pc |
107 | 113 |
]) |
108 | 114 |
|
109 | 115 |
AC_OUTPUT |
110 | 116 |
|
111 | 117 |
echo |
112 | 118 |
echo '****************************** SUMMARY ******************************' |
113 | 119 |
echo |
114 | 120 |
echo Package version............... : $PACKAGE-$VERSION |
115 | 121 |
echo |
116 | 122 |
echo C++ compiler.................. : $CXX |
117 | 123 |
echo C++ compiles flags............ : $CXXFLAGS |
118 | 124 |
echo |
125 |
echo Compiler supports long long... : $long_long_found |
|
126 |
echo |
|
119 | 127 |
#echo GLPK support.................. : $lx_glpk_found |
120 | 128 |
#echo CPLEX support................. : $lx_cplex_found |
121 | 129 |
#echo SOPLEX support................ : $lx_soplex_found |
122 | 130 |
#echo |
123 | 131 |
echo Build demo programs........... : $enable_demo |
124 | 132 |
echo Build additional tools........ : $enable_tools |
125 | 133 |
echo |
126 | 134 |
echo The packace will be installed in |
127 | 135 |
echo -n ' ' |
128 | 136 |
echo $prefix. |
129 | 137 |
echo |
130 | 138 |
echo '*********************************************************************' |
131 | 139 |
|
132 | 140 |
echo |
133 | 141 |
echo Configure complete, now type \'make\' and then \'make install\'. |
134 | 142 |
echo |
... | ... |
@@ -83,33 +83,33 @@ |
83 | 83 |
typedef VectorMap<_Graph, _Item, unsigned short> Map; |
84 | 84 |
}; |
85 | 85 |
|
86 | 86 |
|
87 | 87 |
// long |
88 | 88 |
template <typename _Graph, typename _Item> |
89 | 89 |
struct DefaultMapSelector<_Graph, _Item, signed long> { |
90 | 90 |
typedef VectorMap<_Graph, _Item, signed long> Map; |
91 | 91 |
}; |
92 | 92 |
|
93 | 93 |
template <typename _Graph, typename _Item> |
94 | 94 |
struct DefaultMapSelector<_Graph, _Item, unsigned long> { |
95 | 95 |
typedef VectorMap<_Graph, _Item, unsigned long> Map; |
96 | 96 |
}; |
97 | 97 |
|
98 | 98 |
|
99 |
#if defined |
|
99 |
#if defined HAVE_LONG_LONG |
|
100 | 100 |
|
101 | 101 |
// long long |
102 | 102 |
template <typename _Graph, typename _Item> |
103 | 103 |
struct DefaultMapSelector<_Graph, _Item, signed long long> { |
104 | 104 |
typedef VectorMap<_Graph, _Item, signed long long> Map; |
105 | 105 |
}; |
106 | 106 |
|
107 | 107 |
template <typename _Graph, typename _Item> |
108 | 108 |
struct DefaultMapSelector<_Graph, _Item, unsigned long long> { |
109 | 109 |
typedef VectorMap<_Graph, _Item, unsigned long long> Map; |
110 | 110 |
}; |
111 | 111 |
|
112 | 112 |
#endif |
113 | 113 |
|
114 | 114 |
|
115 | 115 |
// float |
... | ... |
@@ -358,33 +358,33 @@ |
358 | 358 |
static bool less(Value a,Value b) { return a<b;} |
359 | 359 |
///Returns \c true if \c a is \e surely different from \c b |
360 | 360 |
static bool different(Value a,Value b) { return a!=b; } |
361 | 361 |
///Returns \c true if \c a is \e surely positive |
362 | 362 |
static bool positive(Value a) { return 0<a; } |
363 | 363 |
///Returns \c true if \c a is \e surely negative |
364 | 364 |
static bool negative(Value) { return false; } |
365 | 365 |
///Returns \c true if \c a is \e surely non-zero |
366 | 366 |
static bool nonZero(Value a) { return a!=0;} |
367 | 367 |
|
368 | 368 |
///@} |
369 | 369 |
|
370 | 370 |
///Returns zero |
371 | 371 |
static Value zero() {return 0;} |
372 | 372 |
}; |
373 | 373 |
|
374 |
#if |
|
374 |
#if HAVE_LONG_LONG |
|
375 | 375 |
|
376 | 376 |
///Long long integer specialization of Tolerance. |
377 | 377 |
|
378 | 378 |
///Long long integer specialization of Tolerance. |
379 | 379 |
///\warning This class (more exactly, type <tt>long long</tt>) |
380 | 380 |
///is not ansi compatible. |
381 | 381 |
///\sa Tolerance |
382 | 382 |
template<> |
383 | 383 |
class Tolerance<long long int> |
384 | 384 |
{ |
385 | 385 |
public: |
386 | 386 |
///\e |
387 | 387 |
typedef long long int Value; |
388 | 388 |
|
389 | 389 |
///\name Comparisons |
390 | 390 |
///See \ref lemon::Tolerance "Tolerance" for more details. |
0 comments (0 inline)